lwip icon indicating copy to clipboard operation
lwip copied to clipboard

Can't install on Windows 10

Open modliszka opened this issue 9 years ago • 3 comments

Hi! I have problem with installing lwip in my project. Neither npm install lwip doesn't work, nor creating dir, cloning repo and running npm install again.

I've got this error in console:

> if not defined npm_config_node_gyp (node "C:\Users\monika\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) 
 else (node  rebuild )                                                                                                                                                    
gyp: C:\Users\monika\.node-gyp\4.1.1\common.gypi not found (cwd: E:\Path_to_my_app\node_modules\lwip) while reading includes of binding.gyp while tryin
g to load binding.gyp                                                                                                                                                     
gyp ERR! configure error                                                                                                                                                  
gyp ERR! stack Error: `gyp` failed with exit code: 1                                                                                                                      
gyp ERR! stack     at ChildProcess.onCpExit (C:\Users\monika\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:357:16)                          
gyp ERR! stack     at emitTwo (events.js:87:13)                                                                                                                           
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)                                                                                                                 
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)                                                                              
gyp ERR! System Windows_NT 10.0.10240                                                                                                                                     
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\monika\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebu
ild"                                                                                                                                                                      
gyp ERR! cwd E:\Path_to_my_app\node_modules\lwip                                                                                                       
gyp ERR! node -v v4.1.1                                                                                                                                                   
gyp ERR! node-gyp -v v2.0.2                                                                                                                                               
gyp ERR! not ok                                                                                                                                                           

npm ERR! Windows_NT 10.0.10240                                                                                                                                            
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\monika\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"                        
npm ERR! node v4.1.1                                                                                                                                                      
npm ERR! npm  v2.14.3                                                                                                                                                     
npm ERR! code ELIFECYCLE                                                                                                                                                  
npm ERR! [email protected] install: `node-gyp rebuild`                                                                                                                           
npm ERR! Exit status 1                                                                                                                                                    
npm ERR!                                                                                                                                                                  
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.                                                                                                      
npm ERR! This is most likely a problem with the lwip package,                                                                                                             
npm ERR! not with npm itself.                                                                                                                                             
npm ERR! Tell the author that this fails on your system:                                                                                                                  
npm ERR!     node-gyp rebuild                                                                                                                                             
npm ERR! You can get their info via:                                                                                                                                      
npm ERR!     npm owner ls lwip                                                                                                                                            
npm ERR! There is likely additional logging output above.                                                                                                                 

npm ERR! Please include the following file with any support request:                                                                                                      
npm ERR!     E:\Path_to_my_app\node_modules\lwip\npm-debug.log                                                                                         

With newest npm version also doesn't work. I have Windows 10, every C++ libs (I think so) and Python 2.7.

modliszka avatar Nov 10 '15 11:11 modliszka

I found "solution" to this problem.

  1. I had to downgrade node version to 4.0.0. Then I had error:
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 404 status code downloading 64-bit node.lib
gyp ERR! stack     at Request.<anonymous> (C:\Users\monika\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\install.js:403:20)
gyp ERR! stack     at emitOne (events.js:82:20)
gyp ERR! stack     at Request.emit (events.js:169:7)
gyp ERR! stack     at Request.onRequestResponse (C:\Users\monika\AppData\Roaming\npm\node_modules\npm\node_modules\request\request.js:1008:10)
gyp ERR! stack     at emitOne (events.js:77:13)
gyp ERR! stack     at ClientRequest.emit (events.js:169:7)
gyp ERR! stack     at HTTPParser.parserOnIncomingClient (_http_client.js:415:21)
gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)
gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:305:20)
gyp ERR! stack     at emitOne (events.js:77:13)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\monika\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd E:\Projekt_inz\Placetag\placetag-app\node_modules\lwip
gyp ERR! node -v v4.0.0
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\monika\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.0.0
npm ERR! npm  v2.14.3
npm ERR! code ELIFECYCLE
  1. So I upgraded node-gyp version to v3.0.3 (which is the latest) in: C:\Users\monika\AppData\Roaming\npm\node_modules\npm\node_modules\
  2. Then I ran command: npm install in my project... and then it works, after spending many hours searching for solution to my problem.

Does it really have to be so hard to install everything on newest versions of Windows system and npm packages? I think it shouldn't be so :) Please, test my case, maybe you should fix sth :) For example update requirements to install lwip.

modliszka avatar Nov 10 '15 18:11 modliszka

Experienced same issue, the quick way to upgrade npm's packaged version of node-gyp is:

npm explore -g npm -- npm i node-gyp@latest

cchamberlain avatar Oct 14 '16 17:10 cchamberlain

I am having a similar issue on both a mac env and inside a docker container using mhart/alpine-node:8.9.4

-----MAC----- $ node -v v10.8.0 $ npm -v 6.2.0 $ sudo npm install node-gyp npm ERR! code E404 npm ERR! 404 Not Found: node-gyp@^3.6.2

npm ERR! A complete log of this run can be found in: npm ERR! /Users/jeffplesko/.npm/_logs/2018-08-18T02_11_39_511Z-debug.log

-----Docker-----

Step 8/15 : RUN node -v && npm -v ---> Running in 29e961fba213 v8.9.4 5.6.0

Executing busybox-1.26.2-r9.trigger OK: 271 MiB in 51 packages npm ERR! code E404 npm ERR! 404 Not Found: node-gyp@latest

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2018-08-18T02_21_23_918Z-debug.log The command '/bin/sh -c apk add --no-cache -t build-dependencies make gcc g++ python libtool autoconf automake curl && cd $(npm root -g)/npm && npm install -g node-gyp' returned a non-zero code: 1

jeffplesko avatar Aug 18 '18 02:08 jeffplesko