Npm python error

On Mac OS X (Intel) v12.3.1 to make compilation of native modules work, I had to add the following to my .npmrc: python=/usr/local/bin/python3 It took me quite a bit of time to find this trick. Thi...

Here it is:

npm verb cli [
npm verb cli   '/Users/matteo/.nvm/versions/node/v16.14.0/bin/node',
npm verb cli   '/Users/matteo/.nvm/versions/node/v16.14.0/bin/npm',
npm verb cli   'i',
npm verb cli   '--verbose',
npm verb cli   'sqlite3@4'
npm verb cli ]
npm info using npm@8.5.5
npm info using node@v16.14.0
npm timing npm:load:whichnode Completed in 0ms
npm timing config:load:defaults Completed in 1ms
npm timing config:load:file:/Users/matteo/.nvm/versions/node/v16.14.0/lib/node_modules/npm/npmrc Completed in 1ms
npm timing config:load:builtin Completed in 1ms
npm timing config:load:cli Completed in 3ms
npm timing config:load:env Completed in 0ms
npm timing config:load:file:/Users/matteo/temp/gyp-bug/.npmrc Completed in 1ms
npm timing config:load:project Completed in 6ms
npm verb config init.author.name Use `--init-author-name` instead.
npm verb config init.author.email Use `--init-author-email` instead.
npm verb config init.license Use `--init-license` instead.
npm timing config:load:file:/Users/matteo/.npmrc Completed in 2ms
npm timing config:load:user Completed in 2ms
npm timing config:load:file:/Users/matteo/.nvm/versions/node/v16.14.0/etc/npmrc Completed in 0ms
npm timing config:load:global Completed in 0ms
npm timing config:load:validate Completed in 1ms
npm timing config:load:credentials Completed in 1ms
npm timing config:load:setEnvs Completed in 0ms
npm timing config:load Completed in 16ms
npm timing npm:load:configload Completed in 16ms
npm timing npm:load:setTitle Completed in 18ms
npm timing config:load:flatten Completed in 2ms
npm timing npm:load:display Completed in 6ms
npm verb logfile /Users/matteo/.npm/_logs/2022-05-09T06_40_21_252Z-debug-0.log
npm timing npm:load:logFile Completed in 4ms
npm timing npm:load:timers Completed in 0ms
npm timing npm:load:configScope Completed in 0ms
npm timing npm:load Completed in 45ms
npm timing arborist:ctor Completed in 1ms
npm timing arborist:ctor Completed in 0ms
npm timing idealTree:init Completed in 12ms
npm timing idealTree:userRequests Completed in 3ms
npm http fetch GET 200 https://registry.npmjs.org/sqlite3 13ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/nan 6ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/node-pre-gyp 6ms (cache hit)
npm timing idealTree:#root Completed in 34ms
npm http fetch GET 200 https://registry.npmjs.org/npmlog 21ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/nopt 24ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/rimraf 23ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/tar 23ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/detect-libc 29ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/npm-packlist 31ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/mkdirp 35ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/rc 34ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/needle 37ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/semver 38ms (cache hit)
npm timing idealTree:node_modules/sqlite3 Completed in 49ms
npm timing idealTree:node_modules/nan Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/console-control-strings 36ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/ignore-walk 39ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/npm-bundled 38ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/abbrev 40ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/npm-normalize-package-bin 39ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/debug 42ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/ini 38ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/osenv 43ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/are-we-there-yet 42ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/strip-json-comments 40ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/deep-extend 42ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/minimist 48ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/set-blocking 43ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/glob 42ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/gauge 49ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/safe-buffer 46ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/minizlib 46ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/minipass 47ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/fs-minipass 48ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/yallist 47ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/iconv-lite 56ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/sax 57ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/chownr 52ms (cache hit)
npm timing idealTree:node_modules/node-pre-gyp Completed in 75ms
npm timing idealTree:node_modules/detect-libc Completed in 0ms
npm timing idealTree:node_modules/mkdirp Completed in 1ms
npm timing idealTree:node_modules/minimist Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/ms 5ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/safer-buffer 5ms (cache hit)
npm timing idealTree:node_modules/needle Completed in 8ms
npm timing idealTree:node_modules/debug Completed in 1ms
npm timing idealTree:node_modules/iconv-lite Completed in 1ms
npm timing idealTree:node_modules/ms Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/os-homedir 5ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/os-tmpdir 7ms (cache hit)
npm timing idealTree:node_modules/nopt Completed in 11ms
npm timing idealTree:node_modules/abbrev Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/minimatch 7ms (cache hit)
npm timing idealTree:node_modules/npm-packlist Completed in 11ms
npm http fetch GET 200 https://registry.npmjs.org/brace-expansion 4ms (cache hit)
npm timing idealTree:node_modules/ignore-walk Completed in 8ms
npm http fetch GET 200 https://registry.npmjs.org/concat-map 5ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/balanced-match 8ms (cache hit)
npm timing idealTree:node_modules/minimatch Completed in 10ms
npm timing idealTree:node_modules/brace-expansion Completed in 3ms
npm timing idealTree:node_modules/balanced-match Completed in 0ms
npm timing idealTree:node_modules/concat-map Completed in 0ms
npm timing idealTree:node_modules/npm-bundled Completed in 0ms
npm timing idealTree:node_modules/npm-normalize-package-bin Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/aproba 23ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/object-assign 22ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/delegates 26ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/signal-exit 24ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/strip-ansi 24ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/readable-stream 31ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/wide-align 28ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/string-width 30ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/has-unicode 36ms (cache hit)
npm timing idealTree:node_modules/npmlog Completed in 45ms
npm http fetch GET 200 https://registry.npmjs.org/inherits 20ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/process-nextick-args 20ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/string_decoder 20ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/core-util-is 23ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/isarray 22ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/util-deprecate 21ms (cache hit)
npm timing idealTree:node_modules/are-we-there-yet Completed in 28ms
npm timing idealTree:node_modules/console-control-strings Completed in 0ms
npm timing idealTree:node_modules/delegates Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/code-point-at 7ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/ansi-regex 7ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/is-fullwidth-code-point 8ms (cache hit)
npm timing idealTree:node_modules/gauge Completed in 14ms
npm timing idealTree:node_modules/aproba Completed in 0ms
npm timing idealTree:node_modules/has-unicode Completed in 0ms
npm timing idealTree:node_modules/object-assign Completed in 0ms
npm timing idealTree:node_modules/osenv Completed in 2ms
npm timing idealTree:node_modules/os-homedir Completed in 0ms
npm timing idealTree:node_modules/os-tmpdir Completed in 0ms
npm timing idealTree:node_modules/rc Completed in 2ms
npm timing idealTree:node_modules/deep-extend Completed in 0ms
npm timing idealTree:node_modules/ini Completed in 0ms
npm timing idealTree:node_modules/readable-stream Completed in 6ms
npm timing idealTree:node_modules/core-util-is Completed in 0ms
npm timing idealTree:node_modules/inherits Completed in 0ms
npm timing idealTree:node_modules/isarray Completed in 0ms
npm timing idealTree:node_modules/process-nextick-args Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/inflight 8ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/once 9ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/fs.realpath 12ms (cache hit)
npm http fetch GET 200 https://registry.npmjs.org/path-is-absolute 11ms (cache hit)
npm timing idealTree:node_modules/rimraf Completed in 15ms
npm http fetch GET 200 https://registry.npmjs.org/wrappy 4ms (cache hit)
npm timing idealTree:node_modules/glob Completed in 9ms
npm timing idealTree:node_modules/fs.realpath Completed in 0ms
npm timing idealTree:node_modules/inflight Completed in 1ms
npm timing idealTree:node_modules/once Completed in 0ms
npm timing idealTree:node_modules/path-is-absolute Completed in 0ms
npm timing idealTree:node_modules/safe-buffer Completed in 0ms
npm timing idealTree:node_modules/safer-buffer Completed in 0ms
npm timing idealTree:node_modules/sax Completed in 0ms
npm timing idealTree:node_modules/semver Completed in 0ms
npm timing idealTree:node_modules/set-blocking Completed in 0ms
npm timing idealTree:node_modules/signal-exit Completed in 0ms
npm timing idealTree:node_modules/string_decoder Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/number-is-nan 6ms (cache hit)
npm timing idealTree:node_modules/string-width Completed in 10ms
npm timing idealTree:node_modules/code-point-at Completed in 0ms
npm timing idealTree:node_modules/is-fullwidth-code-point Completed in 1ms
npm timing idealTree:node_modules/number-is-nan Completed in 0ms
npm timing idealTree:node_modules/strip-ansi Completed in 1ms
npm timing idealTree:node_modules/ansi-regex Completed in 0ms
npm timing idealTree:node_modules/strip-json-comments Completed in 0ms
npm timing idealTree:node_modules/tar Completed in 5ms
npm timing idealTree:node_modules/chownr Completed in 0ms
npm timing idealTree:node_modules/fs-minipass Completed in 0ms
npm timing idealTree:node_modules/minipass Completed in 0ms
npm timing idealTree:node_modules/minizlib Completed in 0ms
npm timing idealTree:node_modules/util-deprecate Completed in 0ms
npm timing idealTree:node_modules/wide-align Completed in 0ms
npm timing idealTree:node_modules/wrappy Completed in 0ms
npm timing idealTree:node_modules/yallist Completed in 0ms
npm timing idealTree:node_modules/tar/node_modules/safe-buffer Completed in 0ms
npm timing idealTree:buildDeps Completed in 359ms
npm timing idealTree:fixDepFlags Completed in 2ms
npm timing idealTree Completed in 379ms
npm timing reify:loadTrees Completed in 379ms
npm timing reify:diffTrees Completed in 2ms
npm timing reify:retireShallow Completed in 0ms
npm timing reify:createSparse Completed in 15ms
npm timing reify:loadBundles Completed in 0ms
npm timing reifyNode:node_modules/ansi-regex Completed in 181ms
npm timing reifyNode:node_modules/number-is-nan Completed in 180ms
npm timing reifyNode:node_modules/fs-minipass Completed in 181ms
npm timing reifyNode:node_modules/code-point-at Completed in 181ms
npm timing reifyNode:node_modules/wrappy Completed in 181ms
npm timing reifyNode:node_modules/chownr Completed in 182ms
npm timing reifyNode:node_modules/is-fullwidth-code-point Completed in 182ms
npm timing reifyNode:node_modules/path-is-absolute Completed in 182ms
npm timing reifyNode:node_modules/inflight Completed in 182ms
npm timing reifyNode:node_modules/once Completed in 183ms
npm timing reifyNode:node_modules/process-nextick-args Completed in 183ms
npm timing reifyNode:node_modules/strip-json-comments Completed in 182ms
npm timing reifyNode:node_modules/os-tmpdir Completed in 183ms
npm timing reifyNode:node_modules/ini Completed in 183ms
npm timing reifyNode:node_modules/os-homedir Completed in 183ms
npm timing reifyNode:node_modules/string-width Completed in 184ms
npm timing reifyNode:node_modules/wide-align Completed in 184ms
npm timing reifyNode:node_modules/has-unicode Completed in 184ms
npm timing reifyNode:node_modules/object-assign Completed in 184ms
npm timing reifyNode:node_modules/aproba Completed in 184ms
npm timing reifyNode:node_modules/strip-ansi Completed in 185ms
npm timing reifyNode:node_modules/npm-bundled Completed in 185ms
npm timing reifyNode:node_modules/brace-expansion Completed in 186ms
npm timing reifyNode:node_modules/ignore-walk Completed in 186ms
npm timing reifyNode:node_modules/abbrev Completed in 186ms
npm timing reifyNode:node_modules/osenv Completed in 186ms
npm timing reifyNode:node_modules/ms Completed in 187ms
npm timing reifyNode:node_modules/npm-packlist Completed in 189ms
npm timing reifyNode:node_modules/minizlib Completed in 194ms
npm timing reifyNode:node_modules/minipass Completed in 194ms
npm timing reifyNode:node_modules/inherits Completed in 194ms
npm timing reifyNode:node_modules/core-util-is Completed in 194ms
npm timing reifyNode:node_modules/signal-exit Completed in 194ms
npm timing reifyNode:node_modules/set-blocking Completed in 194ms
npm timing reifyNode:node_modules/console-control-strings Completed in 194ms
npm timing reifyNode:node_modules/yallist Completed in 198ms
npm timing reifyNode:node_modules/util-deprecate Completed in 198ms
npm timing reifyNode:node_modules/fs.realpath Completed in 198ms
npm timing reifyNode:node_modules/balanced-match Completed in 198ms
npm timing reifyNode:node_modules/rimraf Completed in 198ms
npm timing reifyNode:node_modules/safe-buffer Completed in 201ms
npm timing reifyNode:node_modules/string_decoder Completed in 201ms
npm timing reifyNode:node_modules/deep-extend Completed in 200ms
npm timing reifyNode:node_modules/minimatch Completed in 200ms
npm timing reifyNode:node_modules/mkdirp Completed in 200ms
npm timing reifyNode:node_modules/npmlog Completed in 201ms
npm timing reifyNode:node_modules/isarray Completed in 204ms
npm timing reifyNode:node_modules/sax Completed in 203ms
npm timing reifyNode:node_modules/tar/node_modules/safe-buffer Completed in 204ms
npm timing reifyNode:node_modules/delegates Completed in 205ms
npm timing reifyNode:node_modules/concat-map Completed in 206ms
npm timing reifyNode:node_modules/are-we-there-yet Completed in 208ms
npm timing reifyNode:node_modules/safer-buffer Completed in 207ms
npm timing reifyNode:node_modules/nopt Completed in 208ms
npm timing reifyNode:node_modules/detect-libc Completed in 207ms
npm timing reifyNode:node_modules/glob Completed in 211ms
npm timing reifyNode:node_modules/semver Completed in 210ms
npm timing reifyNode:node_modules/debug Completed in 212ms
npm timing reifyNode:node_modules/rc Completed in 216ms
npm timing reifyNode:node_modules/npm-normalize-package-bin Completed in 221ms
npm timing reifyNode:node_modules/gauge Completed in 227ms
npm timing reifyNode:node_modules/minimist Completed in 228ms
npm timing reifyNode:node_modules/readable-stream Completed in 235ms
npm timing reifyNode:node_modules/tar Completed in 237ms
npm timing reifyNode:node_modules/iconv-lite Completed in 240ms
npm WARN deprecated node-pre-gyp@0.11.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm timing reifyNode:node_modules/node-pre-gyp Completed in 240ms
npm timing reifyNode:node_modules/needle Completed in 246ms
npm timing reifyNode:node_modules/nan Completed in 249ms
npm timing reifyNode:node_modules/sqlite3 Completed in 269ms
npm timing reify:unpack Completed in 274ms
npm timing reify:unretire Completed in 0ms
npm timing build:queue Completed in 4ms
npm timing build:link:node_modules/detect-libc Completed in 5ms
npm timing build:link:node_modules/node-pre-gyp Completed in 4ms
npm timing build:link:node_modules/nopt Completed in 4ms
npm timing build:link:node_modules/semver Completed in 4ms
npm timing build:link:node_modules/rc Completed in 4ms
npm timing build:link:node_modules/mkdirp Completed in 5ms
npm timing build:link:node_modules/rimraf Completed in 5ms
npm timing build:link:node_modules/needle Completed in 5ms
npm timing build:link Completed in 6ms
npm info run sqlite3@4.2.0 install node_modules/sqlite3 node-pre-gyp install --fallback-to-build
npm info run sqlite3@4.2.0 install { code: 1, signal: null }
npm timing reify:rollback:createSparse Completed in 94ms
npm timing reify:rollback:retireShallow Completed in 0ms
npm timing command:i Completed in 3291ms
npm verb stack Error: command failed
npm verb stack     at ChildProcess.<anonymous> (/Users/matteo/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
npm verb stack     at ChildProcess.emit (node:events:520:28)
npm verb stack     at maybeClose (node:internal/child_process:1092:16)
npm verb stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm verb pkgid sqlite3@4.2.0
npm verb cwd /Users/matteo/temp/gyp-bug
npm verb Darwin 21.4.0
npm verb argv "/Users/matteo/.nvm/versions/node/v16.14.0/bin/node" "/Users/matteo/.nvm/versions/node/v16.14.0/bin/npm" "i" "--verbose" "sqlite3@4"
npm verb node v16.14.0
npm verb npm  v8.5.5
npm ERR! code 1
npm ERR! path /Users/matteo/temp/gyp-bug/node_modules/sqlite3
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! LD_LIBRARY_PATH=/Users/matteo/temp/gyp-bug/node_modules/sqlite3/build/Release/lib.host:/Users/matteo/temp/gyp-bug/node_modules/sqlite3/build/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps; mkdir -p /Users/matteo/temp/gyp-bug/node_modules/sqlite3/build/Release/obj/gen/sqlite-autoconf-3310100; python ./extract.py ./sqlite-autoconf-3310100.tar.gz "/Users/matteo/temp/gyp-bug/node_modules/sqlite3/build/Release/obj/gen"
npm ERR! Failed to execute '/Users/matteo/.nvm/versions/node/v16.14.0/bin/node /Users/matteo/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/matteo/temp/gyp-bug/node_modules/sqlite3/lib/binding/node-v93-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/matteo/temp/gyp-bug/node_modules/sqlite3/lib/binding/node-v93-darwin-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp verb cli [
npm ERR! node-pre-gyp verb cli   '/Users/matteo/.nvm/versions/node/v16.14.0/bin/node',
npm ERR! node-pre-gyp verb cli   '/Users/matteo/temp/gyp-bug/node_modules/.bin/node-pre-gyp',
npm ERR! node-pre-gyp verb cli   'install',
npm ERR! node-pre-gyp verb cli   '--fallback-to-build'
npm ERR! node-pre-gyp verb cli ]
npm ERR! node-pre-gyp info using node-pre-gyp@0.11.0
npm ERR! node-pre-gyp info using node@16.14.0 | darwin | x64
npm ERR! node-pre-gyp verb command install []
npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download 
npm ERR! node-pre-gyp info check checked for "/Users/matteo/temp/gyp-bug/node_modules/sqlite3/lib/binding/node-v93-darwin-x64/node_sqlite3.node" (not found)
npm ERR! node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-darwin-x64.tar.gz
npm ERR! node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-darwin-x64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-darwin-x64.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.2.0 and node@16.14.0 (node-v93 ABI, unknown) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-darwin-x64.tar.gz 
npm ERR! node-pre-gyp verb command build [ 'rebuild' ]
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   '/Users/matteo/.nvm/versions/node/v16.14.0/bin/node',
npm ERR! gyp verb cli   '/Users/matteo/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli   'clean'
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@16.14.0 | darwin | x64
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   '/Users/matteo/.nvm/versions/node/v16.14.0/bin/node',
npm ERR! gyp verb cli   '/Users/matteo/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli   'configure',
npm ERR! gyp verb cli   '--fallback-to-build',
npm ERR! gyp verb cli   '--module=/Users/matteo/temp/gyp-bug/node_modules/sqlite3/lib/binding/node-v93-darwin-x64/node_sqlite3.node',
npm ERR! gyp verb cli   '--module_name=node_sqlite3',
npm ERR! gyp verb cli   '--module_path=/Users/matteo/temp/gyp-bug/node_modules/sqlite3/lib/binding/node-v93-darwin-x64',
npm ERR! gyp verb cli   '--napi_version=8',
npm ERR! gyp verb cli   '--node_abi_napi=napi',
npm ERR! gyp verb cli   '--napi_build_version=0',
npm ERR! gyp verb cli   '--node_napi_label=node-v93'
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@16.14.0 | darwin | x64
npm ERR! gyp verb command configure []
npm ERR! gyp verb find Python Python is not set from command line or npm configuration
npm ERR! gyp verb find Python Python is not set from environment variable PYTHON
npm ERR! gyp verb find Python checking if "python3" can be used
npm ERR! gyp verb find Python - executing "python3" to get executable path
npm ERR! gyp verb find Python - executable path is "/usr/local/opt/python@3.9/bin/python3.9"
npm ERR! gyp verb find Python - executing "/usr/local/opt/python@3.9/bin/python3.9" to get version
npm ERR! gyp verb find Python - version is "3.9.10"
npm ERR! gyp info find Python using Python version 3.9.10 found at "/usr/local/opt/python@3.9/bin/python3.9"
npm ERR! gyp verb get node dir no --target version specified, falling back to host node version: 16.14.0
npm ERR! gyp verb command install [ '16.14.0' ]
npm ERR! gyp verb install input version string "16.14.0"
npm ERR! gyp verb install installing version: 16.14.0
npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed
npm ERR! gyp verb install version is already installed, need to check "installVersion"
npm ERR! gyp verb got "installVersion" 9
npm ERR! gyp verb needs "installVersion" 9
npm ERR! gyp verb install version is good
npm ERR! gyp verb get node dir target node version installed: 16.14.0
npm ERR! gyp verb build dir attempting to create "build" dir: /Users/matteo/temp/gyp-bug/node_modules/sqlite3/build
npm ERR! gyp verb build dir "build" dir needed to be created? Yes
npm ERR! gyp verb build/config.gypi creating config file
npm ERR! gyp verb build/config.gypi writing out config file: /Users/matteo/temp/gyp-bug/node_modules/sqlite3/build/config.gypi
npm ERR! gyp verb config.gypi checking for gypi file: /Users/matteo/temp/gyp-bug/node_modules/sqlite3/config.gypi
npm ERR! gyp verb common.gypi checking for gypi file: /Users/matteo/temp/gyp-bug/node_modules/sqlite3/common.gypi
npm ERR! gyp verb gyp gyp format was not specified; forcing "make"
npm ERR! gyp info spawn /usr/local/opt/python@3.9/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/matteo/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/matteo/temp/gyp-bug/node_modules/sqlite3/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/matteo/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/matteo/Library/Caches/node-gyp/16.14.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/matteo/Library/Caches/node-gyp/16.14.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/matteo/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/matteo/Library/Caches/node-gyp/16.14.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/matteo/temp/gyp-bug/node_modules/sqlite3',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   '/Users/matteo/.nvm/versions/node/v16.14.0/bin/node',
npm ERR! gyp verb cli   '/Users/matteo/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli   'build',
npm ERR! gyp verb cli   '--fallback-to-build',
npm ERR! gyp verb cli   '--module=/Users/matteo/temp/gyp-bug/node_modules/sqlite3/lib/binding/node-v93-darwin-x64/node_sqlite3.node',
npm ERR! gyp verb cli   '--module_name=node_sqlite3',
npm ERR! gyp verb cli   '--module_path=/Users/matteo/temp/gyp-bug/node_modules/sqlite3/lib/binding/node-v93-darwin-x64',
npm ERR! gyp verb cli   '--napi_version=8',
npm ERR! gyp verb cli   '--node_abi_napi=napi',
npm ERR! gyp verb cli   '--napi_build_version=0',
npm ERR! gyp verb cli   '--node_napi_label=node-v93'
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@16.14.0 | darwin | x64
npm ERR! gyp verb command build []
npm ERR! gyp verb build type Release
npm ERR! gyp verb architecture x64
npm ERR! gyp verb node dev dir /Users/matteo/Library/Caches/node-gyp/16.14.0
npm ERR! gyp verb `which` succeeded for `make` /usr/bin/make
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! /bin/sh: python: command not found
npm ERR! make: *** [Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c] Error 127
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/Users/matteo/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.4.0
npm ERR! gyp ERR! command "/Users/matteo/.nvm/versions/node/v16.14.0/bin/node" "/Users/matteo/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/matteo/temp/gyp-bug/node_modules/sqlite3/lib/binding/node-v93-darwin-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/Users/matteo/temp/gyp-bug/node_modules/sqlite3/lib/binding/node-v93-darwin-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd /Users/matteo/temp/gyp-bug/node_modules/sqlite3
npm ERR! gyp ERR! node -v v16.14.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/Users/matteo/.nvm/versions/node/v16.14.0/bin/node /Users/matteo/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/matteo/temp/gyp-bug/node_modules/sqlite3/lib/binding/node-v93-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/matteo/temp/gyp-bug/node_modules/sqlite3/lib/binding/node-v93-darwin-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/matteo/temp/gyp-bug/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:520:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1092:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Darwin 21.4.0
npm ERR! node-pre-gyp ERR! command "/Users/matteo/.nvm/versions/node/v16.14.0/bin/node" "/Users/matteo/temp/gyp-bug/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /Users/matteo/temp/gyp-bug/node_modules/sqlite3
npm ERR! node-pre-gyp ERR! node -v v16.14.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0
npm ERR! node-pre-gyp ERR! not ok
npm verb exit 1
npm timing npm Completed in 3566ms
npm verb unfinished npm timer reify 1652078421518
npm verb unfinished npm timer reify:build 1652078422197
npm verb unfinished npm timer build 1652078422198
npm verb unfinished npm timer build:deps 1652078422198
npm verb unfinished npm timer build:run:install 1652078422208
npm verb unfinished npm timer build:run:install:node_modules/sqlite3 1652078422208
npm verb code 1

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/matteo/.npm/_logs/2022-05-09T06_40_21_252Z-debug-0.log

Scenario: after upgrading the node environment, an error is reported when the project version number does not match. After deciding to reinitialize, an error is reported again

Building: G:nodejsnode.exe F:testnode_modulesnode-gypbinnode-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   'G:\nodejs\node.exe',
gyp verb cli   'F:\test\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 (F:testnode_moduleswhichwhich.js:13:12)
gyp verb `which` failed     at F (F:testnode_moduleswhichwhich.js:68:19)
gyp verb `which` failed     at E (F:testnode_moduleswhichwhich.js:80:29)
gyp verb `which` failed     at F:testnode_moduleswhichwhich.js:89:16
gyp verb `which` failed     at F:testnode_modulesisexeindex.js:42:5
gyp verb `which` failed     at F:testnode_modulesisexewindows.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 (F:testnode_moduleswhichwhich.js:13:12)
gyp verb `which` failed     at F (F:testnode_moduleswhichwhich.js:68:19)
gyp verb `which` failed     at E (F:testnode_moduleswhichwhich.js:80:29)
gyp verb `which` failed     at F:testnode_moduleswhichwhich.js:89:16
gyp verb `which` failed     at F:testnode_modulesisexeindex.js:42:5
gyp verb `which` failed     at F:testnode_modulesisexewindows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:158:21) {
gyp verb `which` failed   stack: 'Error: not found: python2n' +
gyp verb `which` failed     '    at getNotFoundError (F:\test\node_modules\which\which.js:13:12)n' +
gyp verb `which` failed     '    at F (F:\test\node_modules\which\which.js:68:19)n' +
gyp verb `which` failed     '    at E (F:\test\node_modules\which\which.js:80:29)n' +
gyp verb `which` failed     '    at F:\test\node_modules\which\which.js:89:16n' +
gyp verb `which` failed     '    at F:\test\node_modules\isexe\index.js:42:5n' +
gyp verb `which` failed     '    at F:\test\node_modules\isexe\windows.js:36:5n' +
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 G:PythonPython37-32python.EXE
gyp ERR! configure error
gyp ERR! stack Error: Command failed: G:PythonPython37-32python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", 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:295:12)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "G:\nodejs\node.exe" "F:\test\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsas
s_library="
gyp ERR! cwd F:testnode_modulesnode-sass
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN [email protected] requires a peer of [email protected]^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall 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:UsersAdministratorAppDataRoamingnpm-cache_logs2019-11-18T07_33_10_767Z-debug.log

Process finished with exit code 1

The solution for online search is:

npm install --global windows-build-tools --save

But it got stuck when installing windows build tools, so the solution is as follows

1, run npm install -g windows-build-tools
2, in the %temp% folder, find the latest file with a filename similar to dd_installer_20210421124746.log
3, check this file, make sure the log output Closing the installer with exit code 0
4, make sure you have vscode installed
PS: In fact, you can skip steps 2-4, because your python environment has already been installed, and the repeated steps of the installer have already been executed.
5, create a file named dd_client_.log in the %temp% directory
6, edit the file created in 5, add a line Closing installer. return code: 3010. and save it.
Note: Paste %temp% directly in Explorer to open your Windows temp directory.

Finally, NPM install is installed successfully

Read More:

    Table of contents

  • Python is not set from command line or npm configuration node-gyp
  • Nodejs
    /
    node-gyp
    Public
  • Xbrowsersync
    /
    api-docker
    Public
  • Nodejs
    /
    docker-node
    Public

Find the data you need here

We provide programming data of 20 most popular languages, hope to help you!

Previous PostNext Post

npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
npm ERR! gyp ERR! find Python checking if "python3" can be used
npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if "python" can be used
npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if Python is C:UsersOsas DivineAppDataLocalProgramsPythonPython39python.exe
npm ERR! gyp ERR! find Python - "C:UsersOsas DivineAppDataLocalProgramsPythonPython39python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:Program FilesPython39python.exe
npm ERR! gyp ERR! find Python - "C:Program FilesPython39python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:UsersOsas DivineAppDataLocalProgramsPythonPython39-32python.exe
npm ERR! gyp ERR! find Python - "C:UsersOsas DivineAppDataLocalProgramsPythonPython39-32python.exe" could not be run
{
  "name": "functions",
  "description": "Cloud Functions for Firebase",
  "scripts": {
    "lint": "eslint .",
    "serve": "firebase serve --only functions",
    "shell": "firebase functions:shell",
    "start": "npm run shell",
    "deploy": "firebase deploy --only functions",
    "logs": "firebase functions:log"
  },
  "dependencies": {
    "firebase-admin": "^9.8.0",
    "firebase-functions": "^3.14.1",
    "@google-cloud/storage": "^0.4.0",
    "sharp": "^0.18.1"
  },
  "devDependencies": {
    "eslint": "^4.12.0",
    "eslint-plugin-promise": "^3.6.0"
  },
  "private": true
}
npm config set python D:LibraryPythonPython27python.exe

Python is not set from command line or npm configuration node-gyp

run as admin the bash

npm --add-python-to-path='true' --debug install --global windows-build-tools
run as admin the bash

npm --add-python-to-path='true' --debug install --global windows-build-tools
gyp verb `which` failed     at C:UsersITDesktopreact-course-projectsindecision-appnode_moduleswhichwhich.js:89:16
gyp verb `which` failed     at C:UsersITDesktopreact-course-projectsindecision-appnode_modulesisexeindex.js:42:5
gyp verb `which` failed     at C:UsersITDesktopreact-course-projectsindecision-appnode_modulesisexewindows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:153:21)
gyp verb `which` failed   stack:
gyp verb `which` failed    'Error: not found: pythonn    at getNotFoundError (C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\which\which.js:13:12)n    at F (C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\which\which.js:68:19)n    at E (C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\which\which.js:80:29)n    at C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\which\which.js:89:16n    at C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\isexe\index.js:42:5n    at C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\isexe\windows.js:36:5n    at FSReqWrap.oncomplete (fs.js:153:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:Python27python.exe
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:UsersITDesktopreact-course-projectsindecision-appnode_modulesnode-gyplibconfigure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:UsersITDesktopreact-course-projectsindecision-appnode_modulesnode-gyplibconfigure.js:509:16)
gyp ERR! stack     at callback (C:UsersITDesktopreact-course-projectsindecision-appnode_modulesgraceful-fspolyfills.js:295:20)
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:153:21)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:UsersITDesktopreact-course-projectsindecision-appnode_modulesnode-sass
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
node- v 10.16.0
npm -v 6.9.0
npm install -g node-gyp

npm install --global --production windows-build-tools
Error: spawnSync powershell.exe ENOENT
    at Object.spawnSync (internal/child_process.js:1002:20)
    at Object.spawnSync (child_process.js:614:24)
    at spawnSync (C:UsersAKAAppDataRoamingnpmnode_moduleswindows-build-toolsnode_modulesin-gfwlibgeo.js:67:36)
    at Object.queryRegFromPowershell (C:UsersAKAAppDataRoamingnpmnode_moduleswindows-build-toolsnode_modulesin-gfwlibgeo.js:73:3)
    at loop (C:UsersAKAAppDataRoamingnpmnode_moduleswindows-build-toolsnode_modulesin-gfwlibgeo.js:113:16)
    at opts.shift (C:UsersAKAAppDataRoamingnpmnode_moduleswindows-build-toolsnode_modulesin-gfwlibgeo.js:116:7)
    at spawn (C:UsersAKAAppDataRoamingnpmnode_moduleswindows-build-toolsnode_modulesin-gfwlibgeo.js:100:5)
    at spawnSync (C:UsersAKAAppDataRoamingnpmnode_moduleswindows-build-toolsnode_modulesin-gfwlibgeo.js:68:2)
    at Object.queryRegFromRegExe (C:UsersAKAAppDataRoamingnpmnode_moduleswindows-build-toolsnode_modulesin-gfwlibgeo.js:96:3)
    at loop (C:UsersAKAAppDataRoamingnpmnode_moduleswindows-build-toolsnode_modulesin-gfwlibgeo.js:113:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node ./dist/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Nodejs
/
node-gyp
Public

c:UsersMikeDocumentsgittemppluginboutique>npm install windows-registry

> [email protected] install c:UsersMikeDocumentsgittemppluginboutiquenode_modulesref
> node-gyp rebuild


c:UsersMikeDocumentsgittemppluginboutiquenode_modulesref>if not defined npm_config_node_gyp (node "C:Program Filesnodejsnode_modulesnpmbinnode-gyp-bin\....node_modulesnode-gypbinnode-gyp.js" rebuild )  else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:Program FilesPython35python.EXE", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:Program Filesnodejsnode_modulesnpmnode_modulesnode-gyplibconfigure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnode-gyplibconfigure.js:508:16)
gyp ERR! stack     at C:Program Filesnodejsnode_modulesnpmnode_modulesgraceful-fspolyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd c:UsersMikeDocumentsgittemppluginboutiquenode_modulesref
gyp ERR! node -v v8.2.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
c:UsersMikeDocumentsgittemppluginboutique>python
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
c:UsersMikeDocumentsgittemppluginboutique>"C:Program FilesPython35python.EXE"
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
c:UsersMikeDocumentsgittemppluginboutique>node
> var spawn = require('child_process').spawn;
undefined
> var willError = spawn('obviousnonexistentcommand');
undefined
> Error: spawn obviousnonexistentcommand ENOENT
    at exports._errnoException (util.js:1024:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
    at onErrorNT (internal/child_process.js:374:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickDomainCallback (internal/process/next_tick.js:218:9)
> var python = spawn('python');
undefined
>

Xbrowsersync
/
api-docker
Public

gyp ERR! find Python 
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python 
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
gyp ERR! find Python   (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python 
gyp ERR! configure error 
gyp ERR! stack Error: Could not find any Python installation to use
<....>
gyp ERR! not ok
gyp ERR! build error 
gyp ERR! stack Error: not found: make
<....>
gyp ERR! not ok 

Nodejs
/
docker-node
Public

FROM node:7.9-alpine
MAINTAINER Rafael Willians <[email protected]>

RUN mkdir -p /usr/src/auth-service
WORKDIR /usr/src/auth-service

COPY package.json .
RUN yarn --no-emoji --prod

COPY . .

EXPOSE 3000
$ docker-compose up --build
Building api
Step 1/8 : FROM node:7.9-alpine
 ---> 5e1532cfe1ea
Step 2/8 : MAINTAINER Rafael Willians <[email protected]>
 ---> Using cache
 ---> 08fe67f74ce1
Step 3/8 : RUN mkdir -p /usr/src/auth-service
 ---> Using cache
 ---> df72f45a471a
Step 4/8 : WORKDIR /usr/src/auth-service
 ---> Using cache
 ---> 6ef48543f07e
Step 5/8 : COPY package.json .
 ---> Using cache
 ---> b8d993552d26
Step 6/8 : RUN yarn --no-emoji --prod
 ---> Running in c7927c31e1ce
yarn install v0.22.0
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error /usr/src/auth-service/node_modules/bcrypt: Command failed.
Exit code: 1
Command: sh
Arguments: -c node-pre-gyp install --fallback-to-build
Directory: /usr/src/auth-service/node_modules/bcrypt
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp verb cli [ '/usr/local/bin/node',
node-pre-gyp verb cli   '/usr/src/auth-service/node_modules/bcrypt/node_modules/.bin/node-pre-gyp',
node-pre-gyp verb cli   'install',
node-pre-gyp verb cli   '--fallback-to-build' ]
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | linux | x64
node-pre-gyp verb command install []
node-pre-gyp info check checked for "/usr/src/auth-service/node_modules/bcrypt/lib/binding/bcrypt_lib.node" (not found)
node-pre-gyp http GET https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v51-linux-x64.tar.gz
node-pre-gyp http 404 https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v51-linux-x64.tar.gz
node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v51-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v51 ABI) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v51-linux-x64.tar.gz
node-pre-gyp verb command build [ 'rebuild' ]
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/local/bin/node',
gyp verb cli   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'clean' ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb command clean []
gyp verb clean removing "build" directory
gyp info ok
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/local/bin/node',
gyp verb cli   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'configure',
gyp verb cli   '--fallback-to-build',
gyp verb cli   '--module=/usr/src/auth-service/node_modules/bcrypt/lib/binding/bcrypt_lib.node',
gyp verb cli   '--module_name=bcrypt_lib',
gyp verb cli   '--module_path=/usr/src/auth-service/node_modules/bcrypt/lib/binding' ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
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 (/usr/local/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp verb `which` failed     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp verb `which` failed     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:114:15)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp verb `which` failed     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp verb `which` failed     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:114:15) code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp verb `which` failed     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp verb `which` failed     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:114:15)
gyp verb `which` failed  python { Error: not found: python
gyp verb `which` failed     at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp verb `which` failed     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp verb `which` failed     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:114:15) code: 'ENOENT' }
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 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:454:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:368:16)
gyp ERR! stack     at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:16)
gyp ERR! stack     at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:114:15)
gyp ERR! System Linux 4.9.13-moby
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/src/auth-service/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/usr/src/auth-service/node_modules/bcrypt/lib/binding"
gyp ERR! cwd /usr/src/auth-service/node_modules/bcrypt
gyp ERR! node -v v7.9.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/src/auth-service/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/usr/src/auth-service/node_modules/bcrypt/lib/binding' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/src/auth-service/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:194:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:899:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 4.9.13-moby
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/src/auth-service/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/src/auth-service/node_modules/bcrypt
node-pre-gyp ERR! node -v v7.9.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/src/auth-service/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/usr/src/auth-service/node_modules/bcrypt/lib/binding' (1)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
ERROR: Service 'api' failed to build: The command '/bin/sh -c yarn --no-emoji' returned a non-zero code: 1
run apk --no-cache add --virtual native-deps 
  g++ gcc libgcc libstdc++ linux-headers make python && 
  npm install --quiet node-gyp -g &&
  npm install --quiet && 
  apk del native-deps
…cker-node#384
RUN apk --no-cache add g++ gcc libgcc libstdc++ linux-headers make python
RUN npm install --quiet node-gyp -g
RUN apk --no-cache add --virtual native-deps 
  g++ gcc libgcc libstdc++ linux-headers autoconf automake make nasm python git && 
  npm install --quiet node-gyp -g

WORKDIR /usr/src/app

COPY package*.json bower.json .bowerrc ./

RUN npm set progress=false && 
  npm i --silent && 
  $(npm bin)/bower --allow-root i

RUN apk del native-deps
Related nodejs/docker-node#384
RUN apk --no-cache add g++ gcc libgcc libstdc++ linux-headers make python
RUN npm install --quiet node-gyp -g
RUN apk --no-cache add g++ gcc libgcc libstdc++ linux-headers make python
RUN npm install --quiet node-gyp -g
FROM jameskyburz/node:10.15.3-alpine-devtools as devtools

LABEL maintainer="James Kyburz [email protected]"

WORKDIR /usr/src/app

ENV NPM_CONFIG_LOGLEVEL warn
ARG NODE_ENV=development
COPY package.json package-lock*.json npm-shrinkwrap*.json /usr/src/app/
RUN 
  npm i && 
  npm rebuild bcrypt --build-from-source

FROM node:10.15.3-alpine

WORKDIR /usr/src/app

COPY . /usr/src/app
COPY --from=devtools /usr/src/app/node_modules /usr/src/app/node_modules

USER node

ENTRYPOINT ["node", "src/index"]
CMD []

EXPOSE 5000
(1/17) Purging native-deps (20200106.014645)
(2/17) Purging g++ (9.2.0-r3)
(3/17) Purging libc-dev (0.7.2-r0)
(4/17) Purging musl-dev (1.1.24-r0)
(5/17) Purging gcc (9.2.0-r3)
(6/17) Purging binutils (2.33.1-r0)
(7/17) Purging libatomic (9.2.0-r3)
(8/17) Purging libgomp (9.2.0-r3)
(9/17) Purging linux-headers (4.19.36-r0)
(10/17) Purging make (4.2.1-r2)
(11/17) Purging isl (0.18-r0)
(12/17) Purging mpc1 (1.1.0-r1)
(13/17) Purging mpfr4 (4.0.2-r1)
(14/17) Purging python2 (2.7.16-r3)
(15/17) Purging gdbm (1.13-r1)
(16/17) Purging readline (8.0.1-r0)
(17/17) Purging sqlite-libs (3.30.1-r1)
ᐅ docker run -ti --rm jameskyburz/node:10.18.0-alpine3.11-devtools sh
/ # node-gyp --version
v5.0.7
/ # python3 --version
Python 3.8.1
ᐅ docker run -ti --rm jameskyburz/node:12.14.0-alpine3.11-devtools sh
/ # node-gyp --version
v5.0.7
/ # python3 --version
Python 3.8.1
RUN apk --no-cache add g++ gcc libgcc libstdc++ linux-headers make python                           
RUN npm install --quiet node-gyp -g
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz: No such file or directory
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
  g++ (missing):
    required by: world[g++]
  gcc (missing):
    required by: world[gcc]
  linux-headers (missing):
    required by: world[linux-headers]
  make (missing):
    required by: world[make]
  python (missing):
    required by: world[python]
RUN apk --no-cache add --virtual native-deps 
  g++ gcc libgcc libstdc++ linux-headers make python && 
  npm install --quiet node-gyp -g &&
  npm install --quiet && 
  apk del native-deps
error /var/app/client/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments: 
Directory: /var/app/client/node_modules/node-sass
Output:
Building: /usr/local/bin/node /var/app/client/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   '/usr/local/bin/node',
gyp verb cli   '/var/app/client/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] | linux | 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 (/var/app/client/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/var/app/client/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/var/app/client/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /var/app/client/node_modules/which/which.js:89:16
gyp verb `which` failed     at /var/app/client/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /var/app/client/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:191:21)
gyp verb `which` failed  python2 Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/var/app/client/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/var/app/client/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/var/app/client/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /var/app/client/node_modules/which/which.js:89:16
gyp verb `which` failed     at /var/app/client/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /var/app/client/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:191: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` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (/var/app/client/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/var/app/client/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/var/app/client/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /var/app/client/node_modules/which/which.js:89:16
gyp verb `which` failed     at /var/app/client/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /var/app/client/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:191:21)
gyp verb `which` failed  python Error: not found: python
gyp verb `which` failed     at getNotFoundError (/var/app/client/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/var/app/client/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/var/app/client/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /var/app/client/node_modules/which/which.js:89:16
gyp verb `which` failed     at /var/app/client/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /var/app/client/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:191:21) {
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
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 (/var/app/client/node_modules/node-gyp/lib/configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/var/app/client/node_modules/node-gyp/lib/configure.js:406:16)
gyp ERR! stack     at F (/var/app/client/node_modules/which/which.js:68:16)
gyp ERR! stack     at E (/var/app/client/node_modules/which/which.js:80:29)
gyp ERR! stack     at /var/app/client/node_modules/which/which.js:89:16
gyp ERR! stack     at /var/app/client/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /var/app/client/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:191:21)
gyp ERR! System Linux 5.9.8-arch1-1
gyp ERR! command "/usr/local/bin/node" "/var/app/client/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /var/app/client/node_modules/node-sass
gyp ERR! node -v v15.2.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
Build failed with error code: 1
#  ref: https://mherman.org/blog/dockerizing-a-react-app/
# pull official base image
FROM node:15.1.0-alpine3.12

# set working directory
WORKDIR /usr/src/app

# install app dependencies
COPY package.json ./
COPY package-lock.json ./

# Add Python per https://github.com/nodejs/docker-node/issues/384
# https://github.com/nodejs/docker-node/issues/282
# --no-cache: download package index on-the-fly, no need to cleanup afterwards
# --virtual: bundle packages, remove whole bundle at once, when done
RUN apk add --no-cache --virtual build-dependencies 
    python2 
    python3 
    make 
    g++ 
    && npm install 
    && apk del build-dependencies

# add `/app/node_modules/.bin` to $PATH
ENV PATH /usr/src/app/node_modules/.bin:$PATH

# add app
COPY . ./

# start app
CMD ["npm", "start"]
version: "3.8"
services:
    mongo_db:
        image: mongo
        ports:
            - "27017:27017"
        volumes:
            - ./data:/data/db
        restart: on-failure:8
        environment:
          MONGO_INITDB_ROOT_USERNAME: xyz
          MONGO_INITDB_ROOT_PASSWORD: password
    mongo-express:
        image: mongo-express
        restart: always
        ports:
          - "8081:8081"
        links:
          - mongo_db
        depends_on:
          - mongo_db
        environment:
          ME_CONFIG_MONGODB_ADMINUSERNAME: xyz
          ME_CONFIG_MONGODB_ADMINPASSWORD: password
          ME_CONFIG_MONGODB_SERVER: mongo_db
    react_frontend:
        build: "https://${GIT_TOKEN}@github.com/zipzit/privateRepoName.git"
        ## working_dir: /usr/src/app
        ## working_dir: ""
        environment:
           - NODE_ENV=develop
           - REACT_APP_API_BASE_URL=http://192.168.1.15:8080/api
           - REACT_APP_IMAGE_URL=http://192.168.1.15:8080
           - REACT_APP_PUBLIC_URL=http://192.168.1.15:8080
        ports:
            - "3000:3000"
        container_name: "frontend_server"
        volumes:
            - ./frontend:/app'
            - '/app/node_modules'
    backend_server:
        build: "https://${GIT_TOKEN}@github.com/DifferentTeamMember/differentPrivateRepoName.git#master"
        user: "node"
        # working_dir: /usr/src/app
        environment:
            - NODE_ENV=develop
            - HOST=mongo_db
        ports:
          - "8080:8080"
        container_name: "backend_server"
        volumes:
          - ./backend:/usr/src/app
          - ./server_error_log:/usr/src/app/error.log
        links:
          - mongo_db
        depends_on:
          - mongo_db
volumes:
  frontend: {}
  backend: {}
  data: {}
  server_error_log: {}
FROM node:15.1.0-alpine3.12

RUN apk --no-cache add --virtual native-deps 
    g++ gcc libgcc libstdc++ linux-headers make python2 && 
    npm install --quiet node-gyp -g

COPY package.json ./
COPY package-lock.json ./

RUN npm ci && 
    apk del native-deps
FROM node:15.1.0-alpine3.12

RUN apk --no-cache add --virtual native-deps 
    g++ gcc libgcc libstdc++ linux-headers make python2 && 
    npm install --quiet node-gyp -g

COPY package.json ./
COPY package-lock.json ./

RUN npm ci && 
    apk del native-deps
FROM node:15.1.0-alpine3.12

RUN apk --no-cache add --virtual native-deps 
    g++ gcc libgcc libstdc++ linux-headers make python3 && 
    npm install --quiet node-gyp -g

COPY package.json ./
COPY package-lock.json ./

RUN npm ci && 
    apk del native-deps
FROM node:15.1.0-alpine3.12

RUN apk --no-cache add --virtual native-deps 
    g++ gcc libgcc libstdc++ linux-headers make python3 && 
    npm install --quiet node-gyp -g

COPY package.json ./
COPY package-lock.json ./

RUN npm ci && 
    apk del native-deps
RUN apk --no-cache add g++ gcc libgcc libstdc++ linux-headers make python
RUN npm install --quiet node-gyp -g
FROM node:alpine

RUN apk add --no-cache --virtual .gyp python make g++ 
    && npm install 
    && apk del .gyp
FROM node:14-alpine
RUN apk add --no-cache --virtual .gyp python make g++

ENV NODE_ENV=production

WORKDIR /home/node/app

COPY package.json package-lock.json ./

RUN npm install && 
    apk del .gyp

COPY . .

EXPOSE 3000

CMD ["node", "src/index.js"]
Adapted from nodejs/docker-node#384 (comment)

Previous PostNext Post

;
Date: Mon Apr 20 2020

Tags:
Node.js »»»» Node.js Installation »»»» Ubuntu

Node.js 14.x was just released, as was Ubuntu 20.04. Testing my application on that combination failed because native code npm packages fail because python is not found. WTF? I followed the instructions and installed build-essential which supposedly brings in every compiler tool we would need. But … fortunately there is a simple solution.

Remember that when Node.js installs a native-code package, a build tool (node-gyp) is used. That build tool relies on Python. For Node.js 14.x, the team transitioned the requirements such that node-gyp must be executed with Python3, because the Python team has end-of-life’d Python2.

As we’ll see, some of the packages in the npm repository are affected by being unable to install because there is no python command. By default Ubuntu installs Python 3, but it follows the Python community requirements of installing it as python3. Therefore a script trying to run python will fail because there is no python command.

The actual bug here is the script which tries to run python. The Python community has required for several years now that Python be installed as python2 and python3, and therefore scripts must accommodate either one. Therefore an npm package that fails to install because python is not found is in error.

I don’t know where it’s clearly stated the installation requirements to not only install Node.js, but to support installing native code modules. The npm documentation doesn’t document the requirements. The document on
(github.com)
building Node.js from source talks about Python 2 being eschewed in favor of Python 3, but suggests that Python 2 is used if it is found. The NodeSource page on installing on Linux from their package repository says to do only this:

apt-get install -y build-essential

Further, when you install Node.js on Ubuntu from the Nodesource package repository, you’re told this:

## Run `sudo apt-get install -y nodejs` to install Node.js 13.x and npm
## You may also need development tools to build native addons:
     sudo apt-get install gcc g++ make

Hence, that results in Python 3 being the only Python release installed. If we instead install build-essential, Python 2 does get installed alongside Python 3.

I have installed — using Multipass — an Ubuntu 20.4 instance. To set up Node.js, I ran these commands:

    1  curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
    2  sudo apt-get update
    3  sudo apt-get upgrade -y
    4  sudo apt-get install -y nodejs build-essential

You’ll note this is installing Node.js 13.x (13.13 to be exact) but the same result happens if I install Node.js 14.x instead.

Installing build-essential is useful because it installs all compiler tools, including Python. Supposedly.

$ ls /usr/bin/python*
/usr/bin/python2  /usr/bin/python2.7  /usr/bin/python3  /usr/bin/python3.8

We have python2 and python3 installed, but no command named python. Indeed, if I execute python, I get this:

$ python

Command 'python' not found, did you mean:

  command 'python3' from deb python3
  command 'python' from deb python-is-python3

There is no python command installed, and a couple suggestions are made. Ubuntu kindly makes suggestions like this to help guide us in which packages to install.

$ python3
Python 3.8.2 (default, Mar 13 2020, 10:14:16) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

Because Python 3 is installed, we can run it using the python3 command. Bottom line is that on Ubuntu 20.04 there is not a command named python, only python2 and python3.

As we’ll see, for some native code packages in the npm repository, because there is no python command. But.. that’s by intention rather than a bug.

But, wait, the Python community wants us to use python2 and python3 commands

This issue will affect any other tool that expects to run the python command. But it seems that my lack of knowledge about Python has led me astray. I thought that the python command must be updated to equate to Python 3 because Python 3 is now the default. But looking at the Ubuntu Wiki, and then at
(legacy.python.org)
PEP-0394, I see the situation is more nuanced than that.

Namely, the Python community has been in a transition process for many years. There are some Python scripts that only support Python 2, some that only support Python 3, and some that support either. It’s a problem if the python command executes Python 3, because Python-2-only scripts will fail to run.

In the name of backwards compatibility, Unix/Linux/etc distributions are required to install Python 2 as python2 and to install Python 3 as python3.

Therefore, Ubuntu is following the requirements laid out by the Python community. The lack of a python command is by design rather than by mistake.

Back to installing npm packages

Let’s try installing some native code packages and see what happens. To do so, we set up a test directory, and install packages that require native code installation.

    5  mkdir t
    6  cd t
    7  npm init
    8  node --version
    9  npm install bcrypt --save
   10  python
   11  npm install sqlite3 --save

Installing bcrypt works fine. But installing sqlite3 fails with this:

$ npm install sqlite3 --save

> sqlite3@4.2.0 install /home/ubuntu/t/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download 
node-pre-gyp WARN Pre-built binaries not installable for sqlite3@4.2.0 and node@13.13.0 (node-v79 ABI, glibc) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error Remote end closed socket abruptly. 
node-pre-gyp WARN Pre-built binaries not installable for sqlite3@4.2.0 and node@13.13.0 (node-v79 ABI, glibc) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error bad download 
make: Entering directory '/home/ubuntu/t/node_modules/sqlite3/build'
  ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c
make: Entering directory '/home/ubuntu/t/node_modules/sqlite3/build'
  ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c
/bin/sh: 1: python: not found
make: *** [deps/action_before_build.target.mk:13: Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c] Error 127
make: Leaving directory '/home/ubuntu/t/node_modules/sqlite3/build'

There was more output, but the key is there — python: not found.

For libxslt the installation fails, but for another reason having to do with source incompatibilities.

Some native code packages, like sharp, provide prebuilt binaries and do not require compilation on the target system. In the case of SQLite3, that team does the same, but is apparently not supporting Ubuntu 20.04 with prebuilt binaries. Likewise, the SQLite3 team does not yet support Node.js 14.x with prebuilt binaries.

I cannot think of other native code packages but we have found one native code library that fails to install because the python command does not exist.

The solution — that breaks the Python community recommendations

There is a very simple solution that is alluded to above. Namely:

$ sudo apt-get install python-is-python3

When we ran the python command earlier, the message suggested we might find that command in the python-is-python3 package. So we install that package and now the python command works:

$ python
Python 3.8.2 (default, Mar 13 2020, 10:14:16) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

And we can now successfully install SQLite3:

$ npm install sqlite3 --save

> bcrypt@4.0.1 install /home/ubuntu/t/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download 
node-pre-gyp WARN Pre-built binaries not installable for bcrypt@4.0.1 and node@13.13.0 (node-v79 ABI, glibc) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error Remote end closed socket abruptly. 
make: Entering directory '/home/ubuntu/t/node_modules/bcrypt/build'
  CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o
  AR(target) Release/obj.target/../node-addon-api/src/nothing.a
  COPY Release/nothing.a
  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o

Well, «success» is a relative term since there is a zillion warning messages printed because of deprecated this’s and that’s. But it no longer fails on the missing python command.

But of course any Python script that is only compatible with Python 2 will now fail unless we remember to run the python2 command.

To do this magic, a symbolic link is add to /usr/bin:

$ ls -l /usr/bin/python
lrwxrwxrwx 1 root root 7 Apr 15 03:45 /usr/bin/python -> python3

I found strong recommendations to not do this because obviously Python2 scripts will fail to run.

Installing the python-is-python3 package lets us run a script that expects to find a python command. It sets up a condition that is incompatible with Python community requirements. We’re supposed to transition to using python2 for Python 2 scripts, and python3 for Python 3 scripts, and to eschew the python command. But sometimes pragmatism wins out over such clearly stated technical requirements.

About the Author(s)


(davidherron.com)
David Herron
:
David Herron is a writer and software engineer focusing on the wise use of technology. He is especially interested in clean energy technologies like solar power, wind power, and electric cars. David worked for nearly 30 years in Silicon Valley on software ranging from electronic mail systems, to video streaming, to the Java programming language, and has published several books on Node.js programming and electric vehicles.

Books by David Herron

(Sponsored)

Всем привет! Ранее верстал проекты для практики, но это было минимум пол года назад.
Решил на днях установить все, поверстать, но начались траблы. Простыня ошибок.
Установил nvm далее node + npm глобально поставил гальп. Захожу в папку с проектом где уже есть package.json и запускаю npm install, идет установка, но в конце много ошибок. Linux, Windows — один и тот же эффект. Попробовал обновить зависимости через npm-check-updates — вопрос не решился. Устанавливал занового node-gyp и даже под него отдельно ставил python2.7 т.к. в тырнете видел утверждение якобы у него траблы с версиями питона выше 2.7. В общем, я в тупике. Быть может вообще не туда копаю. Помогите.

Ошибки

npm ERR! code 1
npm ERR! path /home/kek/front/theater/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /home/kek/.nvm/versions/node/v16.2.0/bin/node /home/kek/front/theater/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   '/home/kek/.nvm/versions/node/v16.2.0/bin/node',
npm ERR! gyp verb cli   '/home/kek/front/theater/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli   'rebuild',
npm ERR! gyp verb cli   '--verbose',
npm ERR! gyp verb cli   '--libsass_ext=',
npm ERR! gyp verb cli   '--libsass_cflags=',
npm ERR! gyp verb cli   '--libsass_ldflags=',
npm ERR! gyp verb cli   '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@16.2.0 | linux | 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" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (/home/kek/front/theater/node_modules/node-gyp/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/home/kek/front/theater/node_modules/node-gyp/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/home/kek/front/theater/node_modules/node-gyp/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /home/kek/front/theater/node_modules/node-gyp/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /home/kek/front/theater/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /home/kek/front/theater/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:194:21)
npm ERR! gyp verb `which` failed  python2 Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (/home/kek/front/theater/node_modules/node-gyp/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/home/kek/front/theater/node_modules/node-gyp/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/home/kek/front/theater/node_modules/node-gyp/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /home/kek/front/theater/node_modules/node-gyp/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /home/kek/front/theater/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /home/kek/front/theater/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:194:21) {
npm ERR! gyp verb `which` failed   code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python
npm ERR! gyp verb `which` failed     at getNotFoundError (/home/kek/front/theater/node_modules/node-gyp/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/home/kek/front/theater/node_modules/node-gyp/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/home/kek/front/theater/node_modules/node-gyp/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /home/kek/front/theater/node_modules/node-gyp/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /home/kek/front/theater/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /home/kek/front/theater/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:194:21)
npm ERR! gyp verb `which` failed  python Error: not found: python
npm ERR! gyp verb `which` failed     at getNotFoundError (/home/kek/front/theater/node_modules/node-gyp/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/home/kek/front/theater/node_modules/node-gyp/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/home/kek/front/theater/node_modules/node-gyp/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /home/kek/front/theater/node_modules/node-gyp/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /home/kek/front/theater/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /home/kek/front/theater/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:194:21) {
npm ERR! gyp verb `which` failed   code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack     at PythonFinder.failNoPython (/home/kek/front/theater/node_modules/node-gyp/lib/configure.js:484:19)
npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (/home/kek/front/theater/node_modules/node-gyp/lib/configure.js:406:16)
npm ERR! gyp ERR! stack     at F (/home/kek/front/theater/node_modules/node-gyp/node_modules/which/which.js:68:16)
npm ERR! gyp ERR! stack     at E (/home/kek/front/theater/node_modules/node-gyp/node_modules/which/which.js:80:29)
npm ERR! gyp ERR! stack     at /home/kek/front/theater/node_modules/node-gyp/node_modules/which/which.js:89:16
npm ERR! gyp ERR! stack     at /home/kek/front/theater/node_modules/isexe/index.js:42:5
npm ERR! gyp ERR! stack     at /home/kek/front/theater/node_modules/isexe/mode.js:8:5
npm ERR! gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:194:21)
npm ERR! gyp ERR! System Linux 5.11.0-7614-generic
npm ERR! gyp ERR! command "/home/kek/.nvm/versions/node/v16.2.0/bin/node" "/home/kek/front/theater/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /home/kek/front/theater/node_modules/node-sass
npm ERR! gyp ERR! node -v v16.2.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

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/kek/.npm/_logs/2021-05-30T06_13_42_514Z-debug.log

Hello Guys, How are you all? Hope You all Are Fine. Today I Just want to use bcrypt in my nodejs project but as I added bcrypt to my package.json I am facing following error Error: Could not find any Python installation to use in NodeJS. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

Contents

  1. How this Error Occurs ?
  2. How To Solve Error: Could not find any Python installation to use Error ?
  3. Solution 1: For Windows users
  4. Solution 2: For docker
  5. Solution 3: Use bcryptjs instead of bcrypt
  6. Summary

How this Error Occurs ?

I Just want to use bcrypt in my nodejs project but as I added bcrypt to my package.json I am facing following error.

gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if “python” can be used
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! configure error gyp ERR! stack Error: Could not find any Python installation to use

  1. How To Solve Error: Could not find any Python installation to use Error ?

    To Solve Error: Could not find any Python installation to use Error If You are using windows and You are facing this error then Just run this command administrator privileges in your cmd: npm install –global –production windows-build-tools Now, your error must be solved. Second solution is Just add this line in your docker file before Npm Install: RUN apk add –update python make g++ && rm -rf /var/cache/apk/*

  2. Error: Could not find any Python installation to use

    To Solve Error: Could not find any Python installation to use Error If You are using windows and You are facing this error then Just run this command administrator privileges in your cmd: npm install –global –production windows-build-tools Now, your error must be solved. Second solution is Just add this line in your docker file before Npm Install: RUN apk add –update python make g++ && rm -rf /var/cache/apk/*

Solution 1: For Windows users

If You are using windows and You are facing this error then Just run this command administrator privileges in your cmd.

npm install --global --production windows-build-tools

Now, your error must be solved.

Solution 2: For docker

Just add this line in your docker file before Npm Install.

RUN apk add --update python make g++
   && rm -rf /var/cache/apk/*

Solution 3: Use bcryptjs instead of bcrypt

Just Use bcryptjs instead of bcrypt.

With bcryptjs there are no errors. Neither with standard node docker images nor node alpine docker images. Now your error should be solved.

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

  • ERROR in ./node_modules/ngx-window-token/fesm2015/ngx-window-token.mjs. Can’t import the named export ‘InjectionToken’ from non EcmaScript module

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Npm install sqlite3 error
  • Npm install package json error
  • Npm install npm run dev laravel error
  • Npm install node sass error
  • Npm install g npm ошибка

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии