Reputation: 549
I have been trying to install loopback nodejs framework on windows using the command npm install -g loopback-cli
. However, i am getting the following error
> gyp ERR! configure error gyp ERR! stack Error: Can't find Python
> executable "python", you can set the PYTHON env variable. gyp ERR!
> stack at PythonFinder.failNoPython
> (C:\Users\HP\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node_modules\node-gyp\lib\configure.js:483:19)
> gyp ERR! stack at PythonFinder.<anonymous>
> (C:\Users\HP\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node_modules\node-gyp\lib\configure.js:508:16)
> gyp ERR! stack at
> C:\Users\HP\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
> gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21) gyp ERR!
> System Windows_NT 10.0.16299 gyp ERR! command "C:\\Program
> Files\\nodejs\\node.exe"
> "C:\\Users\\HP\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\npm-lifecycle\\node_modules\\node-gyp\\bin\\node-gyp.js"
> "rebuild" gyp ERR! cwd
> C:\Users\HP\AppData\Roaming\npm\node_modules\loopback-cli\node_modules\ursa
> gyp ERR! node -v v8.11.1 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok
> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]
> (node_modules\loopback-cli\node_modules\ursa): npm WARN optional
> SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
Upvotes: 0
Views: 883
Reputation:
You need Python 2.7.x for this to work on your machine. Your windows machine is missing essential build tools.
Install windows build tools from npm.
npm install --global --production windows-build-tools
Upvotes: 2