NodeJS – npm install errors on Windows



NOTE: If you are using Windows 10, you will want to open an Administrator PowerShell (right-click and choose “Run as administrator”). Once opened, type “npm install –global windows-build-tools –vs2015” and be prepared to wait for at least 30 minutes.

NOTE2: The tips in this video does not work for all cases. If it does not work for you and you need help, the best chance of getting assistance is to search for the error via Google. If that yields nothing, then please add a comment here WITH the stack trace of the error. Without the stack trace, nobody will be able to assist!

If you’re developing NodeJS applications on Windows you may have encountered issues installing dependencies. Some of the problems could be related to not finding PYTHON or msbuild:

Can’t find Python executable “python”, you can set the PYTHON env variable.

Error: `C:WindowsMicrosoft.NETFrameworkv4.0.30319msbuild.exe` failed with exit code: 1

If you’ve seen these errors and aren’t sure what to do, you can easily get rid of these problems by globally installing the “windows-build-tools” dependency.

-=[ Links ]=-

Blog post:

Twitter:

Nguồn: https://benjaminjcohen.com/

Xem thêm bài viết khác: https://benjaminjcohen.com/cong-nghe/

48 Comments

  1. Status from the installers:
    ———- Visual Studio Build Tools ———-
    Still waiting for installer log file…
    ——————- Python ——————–
    Still waiting for installer log file…

    This is weird, thanks for the tut with audio 😉

  2. thank you very much, your video got me a lucky

  3. hey I am getting this error during npm install

    """npm ERR! Failed at the bufferutil@3.0.5 install script."""

  4. i am getting this problem —-ssl : The term 'ssl' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + ssl + ~~~ + CategoryInfo : ObjectNotFound: (ssl:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException —
    how can i resolve it…..

  5. I have python3.8 but still it gives this error

  6. After trying these steps , I typed
    npm create-react-app hello_world
    It started creating but stopped near below msg
    found 1 low severity vulnerability
    run ' npm audit fix ' to fix them , or ' mom audit ' for details

    Please tell me what to do

  7. Installing packages…npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142

    npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.

    npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

    npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated

    npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated

    npm ERR! Unexpected end of JSON input while parsing near '…e-map":"^0.5.7","spri'

    npm ERR! A complete log of this run can be found in:

    npm ERR! C:UsersNishantAppDataRoamingnpm-cache_logs2020-05-28T05_24_12_995Z-debug.log

    × Package install failed, see above.

    The Schematic workflow failed. See above.

    I have been getting this error while creating new app of angular. How to resolve this issues?

  8. if u get error about vs build tools try this command. npm install –global –production windows-build-tools@4.0.0

  9. how to download different way and configure with node.js its possible this method is not working in your video

  10. When i try npm start it shows this :
    npm start

    npm ERR! missing script: start
    (Edit: it worked on prev of node.js)

  11. i dont have python but vs code it is taking more time to complete installation and it is waiting too long for completing installation please help me

  12. this was very helpful, thank you!

  13. I have tried reinstalling everything too but I still get the same error
    please help

    gyp ERR! build error

    gyp ERR! stack Error: `C:Program Files (x86)Microsoft Visual Studio2017BuildToolsMSBuild15.0BinMSBuild.exe` failed with exit code: 1

    gyp ERR! stack at ChildProcess.onExit (C:Program Filesnodejsnode_modulesnpmnode_modulesnode-gyplibbuild.js:194:23)

    gyp ERR! stack at ChildProcess.emit (events.js:311:20)

    gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)

    gyp ERR! System Windows_NT 10.0.10586

    gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"

    gyp ERR! cwd C:UsersAdminJPMCJPMC-tech-task-2node_modulesbufferutil

    gyp ERR! node -v v12.16.1

    gyp ERR! node-gyp -v v5.0.5

    gyp ERR! not ok

    npm WARN bootstrap@4.2.1 requires a peer of jquery@1.9.1 – 3 but none is installed. You must install peer dependencies yourself.

    npm WARN bootstrap@4.2.1 requires a peer of popper.js@^1.14.6 but none is installed. You must install peer dependencies yourself.

    npm WARN extract-text-webpack-plugin@3.0.2 requires a peer of webpack@^3.1.0 but none is installed. You must install peer dependencies yourself.

    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modulesfsevents):

    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

    npm ERR! code ELIFECYCLE

    npm ERR! errno 1

    npm ERR! bufferutil@3.0.5 install: `prebuild-install || node-gyp rebuild`

    npm ERR! Exit status 1

    npm ERR!

    npm ERR! Failed at the bufferutil@3.0.5 install script.

    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:

    npm ERR! C:UsersAdminAppDataRoamingnpm-cache_logs2020-04-30T05_46_13_104Z-debug.log

  14. thank you nice human whose I looked when I need it

  15. It shows errors when I type npm start

  16. Hello, I'm following you, youtube! I saw that you use ionic I don't want to settle down I try everything I install Node.js I followed everything to the letter and it didn't work

    …………………..

    Microsoft Windows [Version 10.0.17763.1158]

    (c) 2018 Microsoft Corporation. All rights reserved.

    C:UsersMesidor_2>npm install -g @ionic/cli

    npm ERR! code EEXIST

    npm ERR! path C:UsersMesidor_2AppDataRoamingnpmnode_modules@ionicclibinionic

    npm ERR! dest C:UsersMesidor_2AppDataRoamingnpmionic.cmd

    npm ERR! EEXIST: file already exists, cmd shim 'C:UsersMesidor_2AppDataRoamingnpmnode_modules@ionicclibinionic' -> 'C:UsersMesidor_2AppDataRoamingnpmionic.cmd'

    npm ERR! File exists: C:UsersMesidor_2AppDataRoamingnpmionic.cmd

    npm ERR! Remove the existing file and try again, or run npm

    npm ERR! with –force to overwrite files recklessly.

    npm ERR! A complete log of this run can be found in:

    npm ERR! C:UsersMesidor_2AppDataRoamingnpm-cache_logs2020-04-18T14_07_44_575Z-debug.log

    C:UsersMesidor_2>

  17. Sir m getting error cb() never called,how to fix this

  18. could help me when I type npm run dev he get me error How can I fix this issue ?

  19. This don't fix all problems.
    I have big problem: "npm ERR! code ERR_TLS_CERT_ALTNAME_INVALID" , how i can fix this error?????????? PLEASE!!!!!!!!!!!!!!!! SOMEONE HELP ME, PLEASE!!!!

  20. Npm install is not working, can't install anything.

  21. hi
    I am having the below errors.
    > signal-desktop@1.33.0-beta.4 start C:AsifHalalwebSignal-Desktop-developmentSignal-Desktop-development

    > electron .

    'electron' is not recognized as an internal or external command,

    operable program or batch file.

    npm ERR! code ELIFECYCLE

    npm ERR! errno 1

    npm ERR! signal-desktop@1.33.0-beta.4 start: `electron .`

    npm ERR! Exit status 1

    npm ERR!

    npm ERR! Failed at the signal-desktop@1.33.0-beta.4 start script.

    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:

    npm ERR! C:UsersasifgAppDataRoamingnpm-cache_logs2020-03-27T11_05_02_711Z-debug.log

  22. Hey I get stuck after ng new project

  23. hi Sir! thanks for video
    I tried to install npm in Laravel project
    and I had a lot of errors
    1-found 48 vulnerabilities (20 low, 12 moderate, 16 high) in 21826 scanned packages

    run `npm audit fix` to fix 6 of them.

    30 vulnerabilities require semver-major dependency updates.

    12 vulnerabilities require manual review. See the full report for details.

    2-npm laravel ERR! Unexpected end of JSON input while parsing near '….0"},"dist":{"integri'

  24. thank brother,this solved my problem

  25. You in the video:*Isn't that slow..probably took for 30 seconds*
    Me:its slower than i thought. it takes 3467534875645 hours.

  26. What about the : cant find the file or directory : C:User… etc.

    Im having problems with that

  27. DUDE U SAVED MY FUCKING LIFEEEEEEEEEEEEEEE

    I WAS TRYING TO FIXED THIS SHIT DURING FOUR FUCKING DAYS, AND FINALLY I FOUND THE ANSWER, THANK YOU SO MUCHHHHHHHHHHHHHHH

  28. Thanks! Why didn't I need python before? The error just suddenly showed up one day

  29. hi thanks for the video , me i still have those errors which appear each time i use the install command
    npm ERR! code EACCES

    npm ERR! errno EACCES

    npm ERR! FetchError: request to https://registry.npmjs.org/windows-build-tools failed, reason: connect EACCES 104.16.19.35:443

    npm ERR! at ClientRequest.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnode-fetch-npmsrcindex.js:68:14)

    npm ERR! at ClientRequest.emit (events.js:223:5)

    npm ERR! at TLSSocket.socketErrorListener (_http_client.js:406:9)

    npm ERR! at TLSSocket.emit (events.js:223:5)

    npm ERR! at emitErrorNT (internal/streams/destroy.js:92:8)

    npm ERR! at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)

    npm ERR! at processTicksAndRejections (internal/process/task_queues.js:81:21)

    npm ERR! FetchError: request to https://registry.npmjs.org/windows-build-tools failed, reason: connect EACCES 104.16.19.35:443

    npm ERR! at ClientRequest.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnode-fetch-npmsrcindex.js:68:14)

    npm ERR! at ClientRequest.emit (events.js:223:5)

    npm ERR! at TLSSocket.socketErrorListener (_http_client.js:406:9)

    npm ERR! at TLSSocket.emit (events.js:223:5)

    npm ERR! at emitErrorNT (internal/streams/destroy.js:92:8)

    npm ERR! at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)

    npm ERR! at processTicksAndRejections (internal/process/task_queues.js:81:21) {

    npm ERR! message: 'request to https://registry.npmjs.org/windows-build-tools failed, reason: connect EACCES 104.16.19.35:443',

    npm ERR! type: 'system',

    npm ERR! errno: 'EACCES',

    npm ERR! code: 'EACCES',

    npm ERR! stack: 'FetchError: request to https://registry.npmjs.org/windows-build-tools failed, reason: connect EACCES 104.16.19.35:443n' +

    npm ERR! ' at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)n' +

    npm ERR! ' at ClientRequest.emit (events.js:223:5)n' +

    npm ERR! ' at TLSSocket.socketErrorListener (_http_client.js:406:9)n' +

    npm ERR! ' at TLSSocket.emit (events.js:223:5)n' +

    npm ERR! ' at emitErrorNT (internal/streams/destroy.js:92:8)n' +

    npm ERR! ' at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)n' +

    npm ERR! ' at processTicksAndRejections (internal/process/task_queues.js:81:21)'

    npm ERR! }

  30. Thank you. This fixed the issue.

  31. error:cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js –progress –hide-modules –config=node_modules/laravel-mix/setup/webpack.config.js

  32. After npm init and npm install express –save, when I try npm install ejs –save, I get an error . I am using windows 10 and vscode

  33. I'm getting this error "functions predeploy error: Command terminated with non-zero exit code1".
    Is there anyway I can fix this?

  34. Thanks dude, i successfully installed node-sass

  35. how to solve npm start command error please help me

  36. Please restart this script from an administrative PowerShell!

  37. npm install FFI dies even with python. Gyp sucks

  38. no meu apareceu npm ERR! code ELIFECYCLE.

  39. hello.could this work for angular cli as i m getting this error while creating new app then when i use ng serve it gives me error "An unhandled exception occurred: Could not find module "@angular-devkit/build-an

    gular" from "C:\Users\kiran\new-app".

  40. Thanks a lot, it solves my problem……….

  41. I'm getting an error,
    CERT_HAS_EXPIRED
    request to https://registry.npmjs.org/build-tools failed, reason: certificate has expired

  42. Thanks so much. It solved a problem I've been suffering with for about 36 hours.

  43. why does my installation get stuck for visual studio build tools? is it because i alrready have it installed?

Leave a Reply

Your email address will not be published. Required fields are marked *