insidesherpa / JPMC-tech-task-2

29 stars 201 forks source link

gyp failed for npm install #351

Closed vennilan closed 2 years ago

vennilan commented 2 years ago

Platform: MAC Python version: 2.7.16 (Only version in the MAC)

npm install gives the following error for gyp: **vennila@Vennilas-MBP ~ % npm install npm WARN deprecated @jpmorganchase/perspective-viewer@0.2.23: @jpmorganchase/perspective-viewer has moved to @finos/perspective-viewer npm WARN deprecated @jpmorganchase/perspective@0.2.23: @jpmorganchase/perspective has moved to @finos/perspective npm WARN deprecated @jpmorganchase/perspective-viewer-highcharts@0.2.23: @jpmorganchase/perspective-viewer-highcharts has moved to @finos/perspective-viewer-highcharts

bufferutil@3.0.5 install /Users/vennila/node_modules/bufferutil prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=11.0.0 runtime=node arch=x64 platform=darwin) No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected! gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/Users/vennila/.nvm/versions/node/v11.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12) gyp ERR! System Darwin 19.6.0 gyp ERR! command "/Users/vennila/.nvm/versions/node/v11.0.0/bin/node" "/Users/vennila/.nvm/versions/node/v11.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/vennila/node_modules/bufferutil gyp ERR! node -v v11.0.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok**

After few warnings it ended with error: **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! /Users/vennila/.npm/_logs/2022-01-13T05_08_21_155Z-debug.log**

As per the instruction, downloaded npm_modules and replaced it with the one in my home directory (/Users/vennila) Ran 'npm start' and errors out with: **vennila@Vennilas-MBP ~ % npm start

bank-merge-co-task-2@0.1.0 start /Users/vennila react-scripts start

Could not find a required file. Name: index.html Searched in: /Users/vennila/public npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! bank-merge-co-task-2@0.1.0 start: react-scripts start npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bank-merge-co-task-2@0.1.0 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! /Users/vennila/.npm/_logs/2022-01-13T05_17_45_359Z-debug.log**

Have anyone seen this problem? Any suggestions?

NaincyKumariKnoldus commented 2 years ago

Hey @vennilan Can you try this npm i -g node-gyp

vennilan commented 2 years ago

Still giving error

vennila@Vennilas-MBP ~ % npm i -g node-gyp
/Users/vennila/.nvm/versions/node/v11.0.0/bin/node-gyp -> /Users/vennila/.nvm/versions/node/v11.0.0/lib/node_modules/node-gyp/bin/node-gyp.js

bank-merge-co-task-2@0.1.0 start /Users/vennila react-scripts start

Could not find a required file. Name: index.html Searched in: /Users/vennila/public npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! bank-merge-co-task-2@0.1.0 start: react-scripts start npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bank-merge-co-task-2@0.1.0 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! /Users/vennila/.npm/_logs/2022-01-14T04_03_22_617Z-debug.log vennila@Vennilas-MBP ~ %

vennilan commented 2 years ago

The problem seems to be running the install from my home folder. Changed the folder to JPMC-tech-task-2. Ran 'npm install' which gave error for node-gyp. Installed manually 'npm i -g node-gyp' Ran 'npm start' which worked. Also replaced node_modules folder with the latest one.