To download the necessary modules(MSS), navigate with the terminal to the local folder on which the repository has been cloned by launching:
npm install
then I try to build the I project with:
npm run build-dev
but I get this error:
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] build-dev: `gulp build --env node`
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the [email protected] build-dev script.
npm ERR! This is probably not a problem with npm. There is likely
additional logging output above.
why?
To solve this, it is possible to start again on a healthy basis by reinstalling all the modules used by the application, and by emptying the NPM node package manager cache. The "npm cache clean" command clears the npm cache. Add the "--force" argument to force the operation.
The error above shows that the real cause of the ELIFECYCLE error is the ENOENT error. ENOENT means that npm can't find the file or directory you want it to open. Further down the line, we can see that npm fails to execute the node index. js script.
You need to make sure you have a package. json file right in the current directory where you run the command. Once you see there's a package. json file in the output as shown above, then you can run the npm install command.
This issue happens due to the memory issue, it could be any one of the npm packages.
export NODE_OPTIONS="--max-old-space-size=8192"
This command increases the memory limit. Execute this command in a terminal, before using npm start (It is for windows, check for an equivalent in other platforms)
Another Fix could be that, you installed the wrong Version of Nodejs!! I had the same issue, and raising the memory limit did not solve the issue at all. By uninstalling Node und installing the x64 Version the issue was gone. Reason was, that Nodejs.org was suggesting to install the x86 version 🤦♂️.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With