Skip to content
Advertisement

Fail to install node modules because of node-gyp

I am trying “npm install” and the installation is not finished for the error below..

npm ERR! code 1
npm ERR! path C:UsersBASILISDesktopkronos-webappnode_modulesnode-sass
npm ERR! command failed
npm ERR! command C:Windowssystem32cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:Program Filesnodejsnode.exe C:UsersBASILISDesktopkronos-webappnode_modulesnode-gypbinnode-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@15.14.0 | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2.7" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2.7
npm ERR! gyp verb `which` failed     at getNotFoundError (C:UsersBASILISDesktopkronos-webappnode_moduleswhichwhich.js:13:12)
npm ERR! gyp verb `which` failed     at F (C:UsersBASILISDesktopkronos-webappnode_moduleswhichwhich.js:68:19)
npm ERR! gyp verb `which` failed     at E (C:UsersBASILISDesktopkronos-webappnode_moduleswhichwhich.js:80:29)
npm ERR! gyp verb `which` failed     at C:UsersBASILISDesktopkronos-webappnode_moduleswhichwhich.js:89:16
npm ERR! gyp verb `which` failed     at C:UsersBASILISDesktopkronos-webappnode_modulesisexeindex.js:42:5
npm ERR! gyp verb `which` failed     at C:UsersBASILISDesktopkronos-webappnode_modulesisexewindows.js:36:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:193:21)
npm ERR! gyp verb `which` failed  python2.7 Error: not found: python2.7
npm ERR! gyp verb `which` failed     at getNotFoundError (C:UsersBASILISDesktopkronos-webappnode_moduleswhichwhich.js:13:12)
npm ERR! gyp verb `which` failed     at F (C:UsersBASILISDesktopkronos-webappnode_moduleswhichwhich.js:68:19)
npm ERR! gyp verb `which` failed     at E (C:UsersBASILISDesktopkronos-webappnode_moduleswhichwhich.js:80:29)
npm ERR! gyp verb `which` failed     at C:UsersBASILISDesktopkronos-webappnode_moduleswhichwhich.js:89:16
npm ERR! gyp verb `which` failed     at C:UsersBASILISDesktopkronos-webappnode_modulesisexeindex.js:42:5
npm ERR! gyp verb `which` failed     at C:UsersBASILISDesktopkronos-webappnode_modulesisexewindows.js:36:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:193:21) {
npm ERR! gyp verb `which` failed   code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb could not find "python2.7". checking python launcher
npm ERR! gyp verb build type Release
npm ERR! gyp verb architecture x64
npm ERR! gyp verb node dev dir C:UsersBASILIS.node-gyp15.14.0
npm ERR! gyp verb found first Solution file build/binding.sln
npm ERR! gyp verb could not find "msbuild.exe" in PATH - finding location in registry
npm ERR! gyp info spawn C:WindowsMicrosoft.NETFrameworkv4.0.30319msbuild.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   'build/binding.sln',
npm ERR! gyp info spawn args   '/nologo',
npm ERR! gyp info spawn args   '/p:Configuration=Release;Platform=x64'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:WindowsMicrosoft.NETFrameworkv4.0.30319msbuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onExit (C:UsersBASILISDesktopkronos-webappnode_modulesnode-gyplibbuild.js:262:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:369:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19043
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\BASILIS\Desktop\kronos-webapp\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:UsersBASILISDesktopkronos-webappnode_modulesnode-sass
npm ERR! gyp ERR! node -v v15.14.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1

I tried to first install the version of node-gyp@3.8.0 but is not changed anything I tried to install the current version and i take the same problem as before.

Thanks in advance

Advertisement

Answer

You should install python2.7 to your os

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement