• Register
search
Log In
1 vote
59 views

Problem :

Looking for solution on bellow npm error

npm err! this is probably not a problem with npm. there is likely additional logging output above.

6.9k points

2 Answers

0 votes

Solution :

It looks similar to a bug reported in electron-packager. As a workaround you can downgrade electron-packager to e.g. ^7.7.0. Also you must update the build command slightly as shown bellow:

{
  "scripts": {                                                 
    "build": "electron-packager ./ --platform=linux --arch=x64"
  },                                                           
  "dependencies": {                                            
    "electron": "^1.6.11"                                      
  },                                                           
  "devDependencies": {
    "electron-packager": "^7.7.0"                              
  }                                                            
}                                                              

Note: you can use --all to build for all platforms.

I followed above instructions and my issue got ressolved.

Further Readings :

36.1k points
0 votes

Solution:

Delete your package-lock.json file and node_modules folder. Later perform npm cache clean

npm cache clean --force

exercise npm install

again and run

Lastly, I figure out a solution to this issue without reinstalling npm and I'm posting it since in future it will help someone, Most of the time this error happens javascript heap went out of the memory. As the error tells itself this is not a problem with npm. Just we have to do is

instead of,

npm  run build -prod

Enhance the javascript memory by following,

node --max_old_space_size=4096 node_modules/@angular/cli/bin/ng build --prod

Inside that directory, you can run various commands:

npm start
Starts the development server.

npm run build
Bundles the app into static files for production.

npm test
Starts the test runner.

npm run eject
Removes this tool and copies build dependencies, configuration files
and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

cd myapp
npm start

 

12.8k points
edited by

Related questions

0 votes
2 answers 134 views
134 views
Problem : I want to to run my NodeJS version with the nvm but getting following error: $ nvm use v4.2.4 nvm is not compatible with the npm config "prefix" option: currently set to "/Users/z/.npm-global"Run `npm config delete prefix` or `nvm use --delete- ... it. I have set the prefix on purpose to avoid the sudo npm How can I use nvm without losing the prefix for my globally installed packages?
asked Nov 29, 2019 alecxe 7.5k points
0 votes
2 answers 52 views
52 views
Problem : I am new to Programming. I have created a Maven Project, the JavaScript project is cloned as the git sub-module inside Maven Project. My directory structure is as below mavenapp/src/main/javascript/[npm project files] and inside the package.json my test is looking as below : " ... install But it is not working for me.. npm version : 5.5.1 node version : 9.3.0 How can I fix above error?
asked Mar 3 mphil 2.3k points
0 votes
1 answer 472 views
472 views
Problem : I am beginner in the node.js .Currently I am trying to install node.js using the below command npm install nodemon --save. But when I try to run a server with below command nodemon server.js. then in my terminal I face below error: “Nodemon is not recognized as internal or external command, operable program or batch file”
asked Feb 13 mphil 2.3k points
0 votes
1 answer 40 views
40 views
Problem : Facing following Node.Js error 'npm' is not recognized as an internal or external command, operable program or batch file.
asked Nov 18, 2019 peterlaw 6.9k points
0 votes
1 answer 230 views
230 views
Problem : I am getting following strange error cannot setup codecommit because there is no source control setup, continuing with initialization
asked Nov 12, 2019 peterlaw 6.9k points