2

I have downloaded a project from github and tried npm install in my application but I get this error result:

> [email protected] install C:\Users\Admin\Desktop\New folder\flow\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.0/win32-x64-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.9.0/win32-x64-72_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> [email protected] postinstall C:\Users\Admin\Desktop\New folder\flow\node_modules\node-sass
> node scripts/build.js

Building: C:\Program Files\nodejs\node.exe C:\Users\Admin\Desktop\New folder\flow\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'C:\\Users\\Admin\\Desktop\\New folder\\flow\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library='
gyp verb cli ]
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\Users\Admin\Desktop\New folder\flow\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\Admin\Desktop\New folder\flow\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\Admin\Desktop\New folder\flow\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\Admin\Desktop\New folder\flow\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\Admin\Desktop\New folder\flow\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\Admin\Desktop\New folder\flow\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:158:21)
gyp verb `which` failed  python2 Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\Users\Admin\Desktop\New folder\flow\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\Admin\Desktop\New folder\flow\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\Admin\Desktop\New folder\flow\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\Admin\Desktop\New folder\flow\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\Admin\Desktop\New folder\flow\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\Admin\Desktop\New folder\flow\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:158:21) {
gyp verb `which` failed   stack: 'Error: not found: python2\n' +
gyp verb `which` failed     '    at getNotFoundError (C:\\Users\\Admin\\Desktop\\New folder\\flow\\node_modules\\which\\which.js:13:12)\n' +
gyp verb `which` failed     '    at F (C:\\Users\\Admin\\Desktop\\New folder\\flow\\node_modules\\which\\which.js:68:19)\n' +
gyp verb `which` failed     '    at E (C:\\Users\\Admin\\Desktop\\New folder\\flow\\node_modules\\which\\which.js:80:29)\n' +
gyp verb `which` failed     '    at C:\\Users\\Admin\\Desktop\\New folder\\flow\\node_modules\\which\\which.js:89:16\n' +
gyp verb `which` failed     '    at C:\\Users\\Admin\\Desktop\\New folder\\flow\\node_modules\\isexe\\index.js:42:5\n' +
gyp verb `which` failed     '    at C:\\Users\\Admin\\Desktop\\New folder\\flow\\node_modules\\isexe\\windows.js:36:5\n' +
gyp verb `which` failed     '    at FSReqCallback.oncomplete (fs.js:158:21)',
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python C:\Users\Admin\Anaconda3\python.EXE
gyp verb check python version `C:\Users\Admin\Anaconda3\python.EXE -c "import platform; print(platform.python_version());"` returned: "3.7.4\r\n"
gyp verb could not find "C:\Users\Admin\Anaconda3\python.EXE". checking python launcher
gyp verb could not find "C:\Users\Admin\Anaconda3\python.EXE". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Users\Admin\Anaconda3\python.EXE", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\Admin\Desktop\New folder\flow\node_modules\node-gyp\lib\configure.js:492:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\Admin\Desktop\New folder\flow\node_modules\node-gyp\lib\configure.js:517:16)
gyp ERR! stack     at C:\Users\Admin\Desktop\New folder\flow\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqCallback.oncomplete (fs.js:158:21)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Admin\\Desktop\\New folder\\flow\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\Admin\Desktop\New folder\flow\node_modules\node-sass
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\node-sass):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] postinstall: `node scripts/build.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

audited 21851 packages in 15.679s
found 388 vulnerabilities (12 low, 25 moderate, 349 high, 2 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

As I am a new Angular learner I can't understand the error message? I could run the program in other laptop in my home but can't in my office computer! Please help me know what is the problem and how can I fix it?

EDIT: I also tried npm install --global windows-build-tools but I got this result and seems it's stopped working:

> [email protected] postinstall C:\Users\Admin\AppData\Roaming\npm\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\Admin\.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\Admin\.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 ----------
Still waiting for installer log file...
------------------- Python --------------------
Successfully installed Python 2.7                   

2 Answers 2

1

Try to install this module in Windows. To install node-sass on windows 10, you probably need to install windows-build-tools

https://github.com/felixrieseberg/windows-build-tools

Run following command in terminal

npm install --global windows-build-tools

And try npm install

Sign up to request clarification or add additional context in comments.

1 Comment

You probably need to have visual studio installed and relevant modules such as windows development tools, C++ compile tools on the machine, I think.
0

@Hasani, As you mentioned you can't run the project on the office computer is because your office computer is under the proxy and You should set up the proxy to access the NPM's

Your Error message which says to configure the proxy is here

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

This is how you can do.

For HTTP

npm config set proxy http://proxy_host:port

For HTTPS

use the https proxy address if there is one

npm config set https-proxy https://proxy.company.com:8080

If you have password and user name to be entered you can try this one

npm config set https-proxy http://<username>:<password>@proxy<COMPANYDOMAIN.COM>.com:8080 

3 Comments

I can't understand what is the proxy?
When I connect to wi-fi at the office, it goes automatically to this page: hotspot.sbu.ac.ir/login then there is a form that I must enter my user and pass then the internet will work until I disconected. I also I can open github.com in my browser without any problems.
you are allowed to access this git hub from the browser but not using command line when you behind the proxy. So please do the configuration and follow the steps properly and you can make npm and flutter commands works fine in the office computer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.