• Register
1 vote
314 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 5 3
6,930 points

Please log in or register to answer this question.

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 :

9 7 4
38,600 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

 

10 6 4
31,120 points

Related questions

0 votes
1 answer 109 views
0 votes
2 answers 511 views
511 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
1 answer 64 views
64 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
2 answers 421 views
421 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, 2020 mphil 2.3k points
0 votes
1 answer 1.6K views
1.6K 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, 2020 mphil 2.3k points
0 votes
1 answer 660 views
660 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
0 votes
1 answer 176 views
176 views
Problem : I have recently updated the node to 7.2.1 and noticed that there is the warning coming as below : (node:4346) DeprecationWarning: Calling an asynchronous function without callback is deprecated. Why is this 4346 ? I only have 2000 lines of code in the js file, so it must not be the line-number. Where should I look for that code?
asked Dec 10, 2019 alecxe 7.5k points
0 votes
1 answer 102 views
0 votes
1 answer 2.4K views
2.4K views
Problem : I am just starting coding using the nodejs with express. So I simply did this in my file test.js which is into my folder routes : const myexpress = require('express'); const myrouter = new myexpress.Router(); myrouter.get('/test', (req, res) => { res.send(` ... browser, it tells me it Cannot get/test I don't understand why this is happening to me. Please let me know how can I fix this?
asked Jan 23, 2020 jwilliam 3.9k points