Click here to Skip to main content
15,886,963 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Details
In Angular15 when we try to install "NPM i" we are getting below error. We installed Python 3.1.0 in our system then also it was not resolved. If we used "--legacy-peer-deps" along with "NPM i " it is installing. But in server build getting failed. So client asking to fix this.

Error Starts:

verbose stack Error: command failed
verbose stack at ChildProcess. (C:\Users\DAVIDARCHA\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\promise-spawn\lib\index.js:63:27)
verbose stack at ChildProcess.emit (node:events:513:28)
verbose stack at maybeClose (node:internal/child_process:1100:16)
verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
verbose pkgid node-sass@8.0.0
verbose cwd C:\LEGO\V15\legolists\frontend
verbose Windows_NT 10.0.19044
verbose node v16.18.1
verbose npm v8.19.2
error code 1
error path C:\LEGO\V15\legolists\frontend\node_modules\node-sass
error command failed
error command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
error Building: C:\Program Files\nodejs\node.exe C:\LEGO\V15\legolists\frontend\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
error gyp info it worked if it ends with ok
error gyp verb cli [
error gyp verb cli 'C:\Program Files\nodejs\node.exe',
error gyp verb cli 'C:\LEGO\V15\legolists\frontend\node_modules\node-gyp\bin\node-gyp.js',
error gyp verb cli 'rebuild',
error gyp verb cli '--verbose',
error gyp verb cli '--libsass_ext=',
error gyp verb cli '--libsass_cflags=',
error gyp verb cli '--libsass_ldflags=',
error gyp verb cli '--libsass_library='
error gyp verb cli ]
error gyp info using node-gyp@8.4.1
error gyp info using node@16.18.1 | win32 | x64
error gyp verb command rebuild []
error gyp verb command clean []
error gyp verb clean removing "build" directory
error gyp verb command configure []
error gyp verb find Python Python is not set from command line or npm configuration
error gyp verb find Python Python is not set from environment variable PYTHON
error gyp verb find Python checking if "python3" can be used
error gyp verb find Python - executing "python3" to get executable path
error gyp verb find Python - "python3" is not in PATH or produced an error
error gyp verb find Python checking if "python" can be used
error gyp verb find Python - executing "python" to get executable path
error gyp verb find Python - executable path is "C:\Users\DAVIDARCHA\AppData\Local\Programs\Python\Python310\python.exe"
error gyp verb find Python - executing "C:\Users\DAVIDARCHA\AppData\Local\Programs\Python\Python310\python.exe" to get version
error gyp verb find Python - version is "3.10.10"
error gyp info find Python using Python version 3.10.10 found at "C:\Users\DAVIDARCHA\AppData\Local\Programs\Python\Python310\python.exe"
error gyp verb get node dir no --target version specified, falling back to host node version: 16.18.1
error gyp verb command install [ '16.18.1' ]
error gyp verb install input version string "16.18.1"
error gyp verb install installing version: 16.18.1
error gyp verb install --ensure was passed, so won't reinstall if already installed
error gyp verb install version not already installed, continuing with install 16.18.1
error gyp verb ensuring nodedir is created C:\Users\DAVIDARCHA\AppData\Local\node-gyp\Cache\16.18.1
error gyp verb created nodedir C:\Users\DAVIDARCHA\AppData\Local\node-gyp\Cache\16.18.1
error gyp http GET https://nodejs.org/download/release/v16.18.1/node-v16.18.1-headers.tar.gz
error gyp WARN install got an error, rolling back install
error gyp verb command remove [ '16.18.1' ]
error gyp verb remove using node-gyp dir: C:\Users\DAVIDARCHA\AppData\Local\node-gyp\Cache
error gyp verb remove removing target version: 16.18.1
error gyp verb remove removing development files for version: 16.18.1
error gyp ERR! configure error
error gyp ERR! stack Error: This is most likely not a problem with node-gyp or the package itself and
error gyp ERR! stack is related to network connectivity. In most cases you are behind a proxy or have bad
error gyp ERR! stack network settings.
error gyp ERR! stack at go (C:\LEGO\V15\legolists\frontend\node_modules\node-gyp\lib\install.js:173:17)
error gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:96:5)
error gyp ERR! stack at async install (C:\LEGO\V15\legolists\frontend\node_modules\node-gyp\lib\install.js:62:18)
error gyp ERR! System Windows_NT 10.0.19044
error gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\LEGO\V15\legolists\frontend\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
error gyp ERR! cwd C:\LEGO\V15\legolists\frontend\node_modules\node-sass
error gyp ERR! node -v v16.18.1
error gyp ERR! node-gyp -v v8.4.1
error gyp ERR! not ok
error Build failed with error code: 1
verbose exit 1
timing npm Completed in 684886ms
verbose unfinished npm timer reify 1687346010585
verbose unfinished npm timer reify:build 1687346589956
verbose unfinished npm timer build 1687346589962
verbose unfinished npm timer build:deps 1687346589963
verbose unfinished npm timer build:run:postinstall 1687346592098
verbose unfinished npm timer build:run:postinstall:node_modules/node-sass 1687346592159
verbose code 1
error A complete log of this run can be found in:
error C:\Users\DAVIDARCHA\AppData\Local\npm-cache_logs\2023-06-21T11_13_30_137Z-debug-0.log

Node.js version
node v16.18.1
npm v8.19.2

After running the command :node -p process.versions

{
node: '16.18.1',
v8: '9.4.146.26-node.22',
uv: '1.43.0',
zlib: '1.2.11',
brotli: '1.0.9',
ares: '1.18.1',
modules: '93',
nghttp2: '1.47.0',
napi: '8',
llhttp: '6.0.10',
openssl: '1.1.1q+quic',
cldr: '41.0',
icu: '71.1',
tz: '2022b',
unicode: '14.0',
ngtcp2: '0.8.1',
nghttp3: '0.7.0'
}

package.json

"dependencies": {
"@angular/animations": "15.2.9",
"@angular/cdk": "15.2.9",
"@angular/common": "15.2.9",
"@angular/compiler": "15.2.9",
"@angular/compiler-cli": "15.2.9",
"@angular/core": "15.2.9",
"@angular/forms": "15.2.9",
"@angular/localize": "15.2.9",
"@angular/material": "15.2.9",
"@angular/platform-browser": "15.2.9",
"@angular/platform-browser-dynamic": "15.2.9",
"@angular/platform-server": "15.2.9",
"@angular/router": "15.2.9",
"@fullcalendar/core": "6.1.8",
"@ngneat/dialog": "4.0.0",
"@ngneat/transloco": "4.2.7",
"@ngrx/effects": "15.4.0",
"@ngrx/store": "15.4.0",
"@ngrx/store-devtools": "15.4.0",
"@popperjs/core": "^2.11.8",
"angular-archwizard": "7.0.0",
"bootstrap": "5.3.0",
"chart.js": "4.3.0",
"copy-webpack-plugin": "11.0.0",
"core-js": "3.30.2",
"file-saver": "2.0.5",
"font-awesome": "4.7.0",
"guid-typescript": "1.0.9",
"hammerjs": "2.0.8",
"immutable": "4.3.0",
"intl": "1.2.5",
"jquery": "3.7.0",
"jsog-typescript": "1.0.0-1",
"lodash": "4.17.21",
"ngx-joyride": "2.5.0",
"normalize.css": "8.0.1",
"primeflex": "3.3.1",
"primeicons": "6.0.1",
"primeng": "15.4.1",
"quill": "1.3.7",
"rxjs": "7.8.1",
"typescript": "4.9.5",
"util": "^0.12.5",
"xlsx": "0.18.5",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "15.2.8",
"@angular/cli": "15.2.8",
"@angular/language-service": "15.2.9",
"@ngrx/schematics": "15.4.0",
"@types/jasmine": "4.3.2",
"@types/jasminewd2": "2.0.10",
"@types/node": "20.2.5",
"@typescript-eslint/eslint-plugin": "5.59.9",
"@typescript-eslint/parser": "5.59.9",
"codelyzer": "6.0.2",
"eslint": "8.42.0",
"jasmine-core": "5.0.0",
"jasmine-spec-reporter": "7.0.0",
"karma": "6.4.2",
"karma-chrome-launcher": "3.2.0",
"karma-cli": "2.0.0",
"karma-coverage-istanbul-reporter": "3.0.3",
"karma-jasmine": "5.1.0",
"karma-jasmine-html-reporter": "2.1.0",
"karma-junit-reporter": "2.0.1",
"karma-scss-preprocessor": "4.0.0",
"prettier": "2.8.8",
"replace-in-file": "7.0.1",
"rollup": "3.24.0",
"@rollup/plugin-commonjs": "25.0.0",
"@rollup/plugin-node-resolve": "15.1.0",
"source-map-explorer": "2.5.3",
"ts-node": "10.9.1",
"webpack": "^5.82.0",
"webpack-bundle-analyzer": "^4.9.0"
}

Operating system
Windows 10

What I have tried:

<pre>
We tried all the possible solutions available in google.

https://stackoverflow.com/questions/73306832/npm-error-find-python-python-is-not-set-from-command-line-or-npm-configurati

https://stackoverflow.com/questions/53125291/build-fails-npm-rebuild-node-sass-force

#3333

https://medium.com/@woeterman_94/quickfix-npm-err-gyp-verb-check-python-checking-for-python-executable-python2-in-the-path-70aacdd9d7d3

twilio/twilio-client.js#284
Posted
Updated 23-Jun-23 6:28am

1 solution

These look like the messages that you need to investigate
error gyp ERR! configure error
error gyp ERR! stack Error: This is most likely not a problem with node-gyp or the package itself and
error gyp ERR! stack is related to network connectivity. In most cases you are behind a proxy or have bad
error gyp ERR! stack network settings.

But this is a third party tool, so you will most likely get help from the owners of the tool/package.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900