Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 442 Vote(s) - 3.43 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error with npm install - a pre-gyp error

#1
I wanted to install [this][1] angular 2 calendar using npm. Tried to use npm to install it and then downloaded it and tried to install it. In both cases its failed.

I am on windows and I previously got this error trying to install angular2 CLI. Now I am getting the same error for this package and I am not sure how to rectify it. I tried to unistall the CLI and then clear the cache and that didnt work.

Could some one have a look at the error and let me know what steps I need to do to rectify this..

The error as it appears on the cmd is as follows:

C:\Users\simon\SPA\ANGULAR2 CALENDAR EXAMPLE>npm install

> [email protected] install C:\Users\simon\node_modules\node-zopfli
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download:

[To see links please register here]

node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to source compile with node-gyp)
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error
MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK vers
ion in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\simon\
node_modules\node-zopfli\build\zopfli.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\simon\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\simon\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\Users\\simon\\node_modules\\node-zopfli\\lib\\binding\\node-v48-win32-x64\\zopfli.node" "--module_name=zopfli" "--module_path=C:\\Users\\simon\\node_modules\\node-zopfli\\lib\\binding\\node-v48-win32-x64"
gyp ERR! cwd C:\Users\simon\node_modules\node-zopfli
gyp ERR! node -v v6.6.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\simon\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\simon\node_modules\node-zopfli\lib\binding\node-v48-win32-x64\zopfli.node --module_name=zopfli --module_path=C:\Users\simon\node_modules\node-zopfli\lib\binding\node-v48-win32-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\simon\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Windows_NT 10.0.14393
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\simon\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\simon\node_modules\node-zopfli
node-pre-gyp ERR! node -v v6.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.30
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\simon\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\simon\node_modules\node-zopfli\lib\binding\node-v48-win32-x64\zopfli.node --module_name=zopfli --module_path=C:\Users\simon\node_modules\node-zopfli\lib\binding\node-v48-win32-x64' (1)

I am on node.js 6.6.0 and npm 3.10.3

**EDIT:**

I was hoping Luiz answer...

npm install -g node-gyp

would work but unfortunately, whist the install worked perfectly for gym.. I got these errors.. as follows...

> [email protected] install C:\Users\simon\node_modules\node-zopfli
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download:

[To see links please register here]

node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to source compile with node-gyp)
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and select
ing "Retarget solution". [C:\Users\simon\node_modules\node-zopfli\build\zopfli.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\simon\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\simon\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\Users\\simon\\node_modules\\node-zopfli\\lib\\binding\\node-v48-win32-x64\\zopfli.node" "--module_name=zopfli" "--module_path=C:\\Users\\simon\\node_modules\\node-zopfli\\lib\\binding\\node-v48-win32-x64"
gyp ERR! cwd C:\Users\simon\node_modules\node-zopfli
gyp ERR! node -v v6.6.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\simon\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\simon\node_modules\node-zopfli\lib\binding\node-v48-win32-x64\zopfli.node --module_name=zopfli --module_path=C:\Users\simon\node_modules\node-zopfli\lib\binding\node-v48-win32-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\simon\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Windows_NT 10.0.14393
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\simon\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\simon\node_modules\node-zopfli
node-pre-gyp ERR! node -v v6.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.30
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\simon\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\simon\node_modules\node-zopfli\lib\binding\node-v48-win32-x64\zopfli.node --module_name=zopfli --module_path=C:\Users\simon\node_modules\node-zopfli\lib\binding\node-v48-win32-x64' (1)
npm WARN install:[email protected] [email protected] install: `node-pre-gyp install --fallback-to-build`
npm WARN install:[email protected] Exit status 1
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\simon\package.json'
npm WARN @ng-bootstrap/[email protected] requires a peer of @angular/forms@^2.0.0 but none was installed.
npm WARN [email protected] requires a peer of [email protected] || 2.x.x || 2.x.x-beta but none was installed.
npm WARN simon No description
npm WARN simon No repository field.
npm WARN simon No README data
npm WARN simon No license field.

There appears to be more issues.. any more ideas


[1]:

[To see links please register here]

Reply

#2
I had to install python first python.org, you need to use version 2.7 as node-gyp doesn't support the later versions.

So install python 2.7, then `npm install -g node-gyp`. That worked for me and got rid of all the other errors install angular-cli as well.

Reply

#3
I had a similar problem on windows, installing node-gyp globally removed those errors.

# before installing node-gyp on windows
npm install --global --production windows-build-tools

# install node-gyp globally
npm install -g node-gyp
Reply

#4
Remove `package-lock.json` and `node_modules`. Run `npm install`
Reply

#5
Using mac os, Running this command helped.

npm --build-from-source install node-pre-gyp
Reply

#6
I was facing this issue now, after some dynamic setup it's work as below

1. use bash command in your terminal (zsh is not working good here)
2. type: nvm install 12.18.2
3. type: nvm use 12.18.2
4. npm install
5. npm start
6. (Bingo...)
Reply

#7
For me there was a problem with proxy. So I set an invalid npm proxy value in npm config. Then i got following output:

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN download ignoring invalid "proxy" config setting: "0.0.0.0"
[bcrypt] Success: ...
Reply

#8
### Use an older version of node

What worked for me was to use an older version of node.

For example, I was using node `v14` and using `v12` completed the instalation.

To do that, you should see [this answer][1].


### If not enough use an older python version

If using an older version of node is not enough, then you should also use and older python version.

For example, I was using python `v 3.9` and changing to using `v 2.7` solved it.

To do that, you should see [this answer][2].


[1]:

[To see links please register here]

[2]:

[To see links please register here]

Reply

#9
I solved this issue by typing the following:

npm install grpc --save
npm install node-pre-gyp --save
Reply

#10
I faced this error when I was running a project which has `sqlite3` package and It seems like the one causing error when I run `npm install`. So, I resoved this by:

1. Removing the sqlite3 in package.json
2. Running `npm install`
3. Reinstalling sqlite3, `npm install sqlite3`
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through