insidesherpa / JPMC-tech-task-2-PY3

29 stars 348 forks source link

npm Installation error #489

Open chaitalivkeni opened 3 years ago

chaitalivkeni commented 3 years ago

the following errors arise when I use npm install

npm install

bufferutil@3.0.5 install C:\Users\DELL\JPMC-tech-task-2-PY3\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=win32)

C:\Users\DELL\JPMC-tech-task-2-PY3\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Users\DELL\AppData\Roaming\nvm\v11.0.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\DELL\AppData\Roaming\nvm\v11.0.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) gyp ERR! configure error gyp ERR! stack Error: Command failed: C:\Python38\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3]; gyp ERR! stack File "", line 1 gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3]; gyp ERR! stack ^ gyp ERR! stack SyntaxError: invalid syntax gyp ERR! stack gyp ERR! stack at ChildProcess.exithandler (child_process.js:289:12) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at maybeClose (internal/child_process.js:962:16) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5) gyp ERR! System Windows_NT 10.0.19041 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\DELL\AppData\Roaming\nvm\v11.0.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\DELL\JPMC-tech-task-2-PY3\node_modules\bufferutil gyp ERR! node -v v11.0.0 gyp ERR! node-gyp -v v3.8.0 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_modules\fsevents): 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:\Users\DELL\AppData\Roaming\npm-cache_logs\2021-01-27T21_55_53_151Z-debug.log

ibrahimimg commented 3 years ago
chaitalivkeni commented 3 years ago

Thank you Ibrahim. I tried doing the aforementioned steps but got the below error.

npm install internal/modules/cjs/loader.js:589 throw err; ^

Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:587:15) at Function.Module._load (internal/modules/cjs/loader.js:513:25) at Function.Module.runMain (internal/modules/cjs/loader.js:760:12) at startup (internal/bootstrap/node.js:303:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:872:3) internal/modules/cjs/loader.js:589 throw err; ^

Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:587:15) at Function.Module._load (internal/modules/cjs/loader.js:513:25) at Function.Module.runMain (internal/modules/cjs/loader.js:760:12) at startup (internal/bootstrap/node.js:303:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:872:3)

Sirbay commented 3 years ago

The following error below occur when trying npm install on windows 10

(base) C:\Users\user\nvm\v11.0.0\node_modules\windows-build-tools>npm install npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

windows-build-tools@5.2.2 postinstall C:\Users\user\nvm\v11.0.0\node_modules\windows-build-tools node ./dist/index.js

Downloading python-2.7.15.amd64.msi [> ] 0.0% (0 B/s) Downloaded python-2.7.15.amd64.msi. Saved to C:\Users\user.windows-build-tools\python-2.7.15.amd64.msi. Downloading vs_BuildTools.exe [> ] 0.0% (0 B/s) Downloaded vs_BuildTools.exe. Saved to C:\Users\user.windows-build-tools\vs_BuildTools.exe.

Starting installation... Launched installers, now waiting for them to finish. This will likely take some time - please be patient!

Status from the installers: ---------- Visual Studio Build Tools ---------- Successfully installed Visual Studio Build Tools. ------------------- Python -------------------- Still waiting for installer log file...

Now configuring the Visual Studio Build Tools and Python...

All done!

windows-build-tools@5.2.2 prepare C:\Users\user\nvm\v11.0.0\node_modules\windows-build-tools npm run build

windows-build-tools@5.2.2 build C:\Users\user\nvm\v11.0.0\node_modules\windows-build-tools tsc -p tsconfig.json

error TS5058: The specified path does not exist: 'tsconfig.json'. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! windows-build-tools@5.2.2 build: tsc -p tsconfig.json npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the windows-build-tools@5.2.2 build 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:\Users\user\AppData\Roaming\npm-cache_logs\2021-02-01T14_06_14_847Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! windows-build-tools@5.2.2 prepare: npm run build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the windows-build-tools@5.2.2 prepare 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:\Users\user\AppData\Roaming\npm-cache_logs\2021-02-01T14_06_15_123Z-debug.log

T2error

Sirbay commented 3 years ago

The following error below occur when trying npm install;

Anyone, kindly help with a solution. Thanks

(base) C:\Users\user\nvm\v11.0.0\node_modules\windows-build-tools>npm install npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

windows-build-tools@5.2.2 postinstall C:\Users\user\nvm\v11.0.0\node_modules\windows-build-tools node ./dist/index.js

Downloading python-2.7.15.amd64.msi [> ] 0.0% (0 B/s) Downloaded python-2.7.15.amd64.msi. Saved to C:\Users\user.windows-build-tools\python-2.7.15.amd64.msi. Downloading vs_BuildTools.exe [> ] 0.0% (0 B/s) Downloaded vs_BuildTools.exe. Saved to C:\Users\user.windows-build-tools\vs_BuildTools.exe.

Starting installation... Launched installers, now waiting for them to finish. This will likely take some time - please be patient!

Status from the installers: ---------- Visual Studio Build Tools ---------- Successfully installed Visual Studio Build Tools. ------------------- Python -------------------- Still waiting for installer log file...

Now configuring the Visual Studio Build Tools and Python...

All done!

windows-build-tools@5.2.2 prepare C:\Users\user\nvm\v11.0.0\node_modules\windows-build-tools npm run build

windows-build-tools@5.2.2 build C:\Users\user\nvm\v11.0.0\node_modules\windows-build-tools tsc -p tsconfig.json

error TS5058: The specified path does not exist: 'tsconfig.json'. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! windows-build-tools@5.2.2 build: tsc -p tsconfig.json npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the windows-build-tools@5.2.2 build 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:\Users\user\AppData\Roaming\npm-cache_logs\2021-02-01T14_06_14_847Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! windows-build-tools@5.2.2 prepare: npm run build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the windows-build-tools@5.2.2 prepare 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:\Users\user\AppData\Roaming\npm-cache_logs\2021-02-01T14_06_15_123Z-debug.log

T2error

chaitalivkeni commented 3 years ago

Kindly help me with this issue.

Sirbay commented 3 years ago

if you have Anaconda installed, launch the cmd prompt in the administrator mode. change directory to the where you cloned the repository as shown in the attached. Notice the highlighted command line in the attached and follow suit. t2

GraceJiang0312 commented 3 years ago

Hi, I wonder if anyone has encountered this before? Could you please help? Thank you!

Untitled
sydgible commented 3 years ago

hey, i had a similar issue and just wanted to share for anyone else looking for more clues. I'm on windows 10

for me, installing the MSBuild Tools 2017 ver 15.9 got me through 'npm install'. If you follow the instructions for installing Visual C++ Build Environment via Visual Studio BuildTools, the download link ends up installing for 2019. Try this website instead for installing Build Tools for Visual Studio 2017 (version 15.9): https://visualstudio.microsoft.com/vs/older-downloads

then set your npm configs npm config set msvs_version 2017 'npm config set python c:\python27\python.exe' or whatever the path to your python2.7 is. i think node-gyp relies on python2.7. double check npm configs 'npm config list'

and i stuck with node 11.0.0 and npm 6.4.1, since that's what the project used for working with the MSBuild tools 2017.

check with: 'node -v' 'npm -v' if different, run: 'nvm install v11.0.0' 'nvm use 11.0.0'

then run 'npm install' had a bunch of warnings, but it completed.

and in case the following applies to you, there are a bunch of links saying to use 'npm install --global --production --verbose windows-build-tools', or some iteration of that like adding '@4.0.0', but I kept running into issues with them. and i haven't tried using chocolatey, which might work too if it fetches the right version of the build tools.