I am creating an Angular Element 'ele-counter' in my application. I have tested the component separately it is working fine. It builds successfully. But when I am trying to run the package to create the 'ele-counter.js' file, it gives the following error 'Failed to exec package script' - error code ELIFECYCLE. I am using JScat to run the package. Below is my code
package.json
"build-element": "ng build ele-counter && ng build --prod --output-hashing none",
"package": "jscat ./dist/custom-counter/runtime.js ./dist/custom-counter/polyfills.js ./dist/custom-counter/scripts.js ./dist/custom-counter/main.js > ele-counter.js"
When I try to run the following command
npm run build-element && npm run package
The first command runs fine. But it fails at - npm run package
The following is from the log file
info lifecycle custom-counter@0.0.0~package: Failed to exec package script
verbose stack Error: custom-counter@0.0.0 package: `jscat ./dist/custom-counter/runtime.js ./dist/custom-counter/polyfills.js ./dist/custom-counter/scripts.js ./dist/custom-counter/main.js > ele-counter.js`
verbose stack Exit status 1
error code ELIFECYCLE
error errno 1
This is probably not a problem with npm. There is likely additional logging output above.
I already tried cache clean, updating node_modules etc. whichever solution found when I googled. But nothing worked.
Can anyone help?