stencil-cli icon indicating copy to clipboard operation
stencil-cli copied to clipboard

Global install fails

Open smithpg opened this issue 4 months ago • 16 comments

I'm getting the following error when attempting to run npm install -g @bigcommerce/stencil-cli

57 info run [email protected] install ../../Local/npm-cache/_cacache/tmp/git-clonetTOX7R node scripts/install.js 58 info run [email protected] install { code: 1, signal: null } 59 timing reify:rollback:createSparse Completed in 0ms 60 timing reify:rollback:retireShallow Completed in 0ms 61 timing command:install Completed in 2387ms 62 verbose stack Error: command failed 62 verbose stack at ChildProcess. (C:\Users\my-user-name\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\promise-spawn\lib\index.js:53:27) 62 verbose stack at ChildProcess.emit (node:events:524:28) 62 verbose stack at maybeClose (node:internal/child_process:1104:16) 62 verbose stack at ChildProcess._handle.onexit (node:internal/child_process:304:5) 63 verbose pkgid [email protected] 64 verbose cwd C:\Users\my-user-name\AppData\Local\npm-cache_cacache\tmp\git-clonetTOX7R 65 verbose Windows_NT 10.0.19045 66 verbose node v20.19.3 67 verbose npm v9.9.3 68 error code 1 69 error path C:\Users\my-user-name\AppData\Local\npm-cache_cacache\tmp\git-clonetTOX7R 70 error command failed 71 error command C:\Windows\system32\cmd.exe /d /s /c node scripts/install.js 72 error node:internal/modules/cjs/loader:1215 72 error throw err; 72 error ^ 72 error 72 error Error: Cannot find module 'make-fetch-happen' 72 error Require stack: 72 error - C:\Users\my-user-name\AppData\Local\npm-cache_cacache\tmp\git-clonetTOX7R\scripts\install.js 72 error at Module._resolveFilename (node:internal/modules/cjs/loader:1212:15) 72 error at Module._load (node:internal/modules/cjs/loader:1043:27) 72 error at Module.require (node:internal/modules/cjs/loader:1298:19) 72 error at require (node:internal/modules/helpers:182:18) 72 error at Object. (C:\Users\my-user-name\AppData\Local\npm-cache_cacache\tmp\git-clonetTOX7R\scripts\install.js:8:11) 72 error at Module._compile (node:internal/modules/cjs/loader:1529:14) 72 error at Module._extensions..js (node:internal/modules/cjs/loader:1613:10) 72 error at Module.load (node:internal/modules/cjs/loader:1275:32) 72 error at Module._load (node:internal/modules/cjs/loader:1096:12) 72 error at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:164:12) { 72 error code: 'MODULE_NOT_FOUND', 72 error requireStack: [ 72 error 'C:\Users\my-user-name\AppData\Local\npm-cache\_cacache\tmp\git-clonetTOX7R\scripts\install.js' 72 error ] 72 error } 72 error 72 error Node.js v20.19.3 73 verbose exit 1

I noticed that there is a recent change to the this library that seems like it could be related

https://github.com/bigcommerce/stencil-styles/pull/146/files

Specifically this change to the node-sass dependency

"node-sass": "^9.0.0", -> "node-sass": "git+ssh://[email protected]/bigcommerce-labs/node-sass.git"

smithpg avatar Oct 10 '25 22:10 smithpg

I have the same issue.

preva-digitalsurgeons avatar Oct 11 '25 11:10 preva-digitalsurgeons

Same thing as well.

jordanlb-724 avatar Oct 11 '25 20:10 jordanlb-724

Any update on this? Dealing with this issue right now as well.

stefanmiodrag avatar Oct 13 '25 09:10 stefanmiodrag

Same here, anyone found a workaround?

JoshuaMadrid-Demdaco avatar Oct 13 '25 17:10 JoshuaMadrid-Demdaco

Same here, anyone found a workaround?

There's a way with not doing it global but do --save-dev and running npx stencil... however I'd rather have a proper fix that doesn't save this into the package lock.

I also wonder if this issue is breaking their sandbox store creation? I've tried 2 times today and not got anything for hours already now.

Maybe they're fixing it here: https://github.com/bigcommerce/stencil-cli/pull/1329

dio5 avatar Oct 13 '25 17:10 dio5

Sorry for inconvenience, it should be fixed now in 8.10.4

jairo-bc avatar Oct 13 '25 20:10 jairo-bc

Sorry for inconvenience, it should be fixed now in 8.10.4

It's fine 🥲 Thank you for resolving it.

stefanmiodrag avatar Oct 14 '25 02:10 stefanmiodrag

I'm still experiencing the same issue on my mac. Is this still known as open and getting addressed?

npm install -g @bigcommerce/[email protected]
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '[email protected]',
npm warn EBADENGINE   required: { node: '>=20.18.1' },
npm warn EBADENGINE   current: { node: 'v20.16.0', npm: '10.8.1' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '[email protected]',
npm warn EBADENGINE   required: { node: '>=20.18.1' },
npm warn EBADENGINE   current: { node: 'v20.16.0', npm: '10.8.1' }
npm warn EBADENGINE }
npm warn deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Node Sass is no longer supported. Please use `sass` or `sass-embedded` instead.
npm error code 1

Guinto avatar Oct 23 '25 23:10 Guinto

This works on 8.10.4

https://github.com/bigcommerce/stencil-cli/issues/1251#issuecomment-3025703172

nisharg-codal avatar Oct 27 '25 14:10 nisharg-codal

Like mentioned above I'm even specifically installing 8.10.4 and it's not working for some reason. I've even ran it on a brand new machine. Could it be something mac specific? I'm running this on a new mac in both cases.

Guinto avatar Oct 28 '25 18:10 Guinto

@Guinto can you send here the full npm error log?

jairo-bc avatar Oct 28 '25 19:10 jairo-bc

@jairo-bc Here's the full log

npm install -g @bigcommerce/stencil-cli
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '[email protected]',
npm warn EBADENGINE   required: { node: '>=20.18.1' },
npm warn EBADENGINE   current: { node: 'v20.16.0', npm: '10.8.1' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '[email protected]',
npm warn EBADENGINE   required: { node: '>=20.18.1' },
npm warn EBADENGINE   current: { node: 'v20.16.0', npm: '10.8.1' }
npm warn EBADENGINE }
npm warn deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Node Sass is no longer supported. Please use `sass` or `sass-embedded` instead.
npm error code 1
npm error path /Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass
npm error command failed
npm error command sh -c node scripts/build.js
npm error Binary found at /Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/vendor/darwin-arm64-115/binding.node
npm error Testing binary
npm error Binary has a problem: Error: dlopen(/Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/vendor/darwin-arm64-115/binding.node, 0x0001): tried: '/Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/vendor/darwin-arm64-115/binding.node' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/vendor/darwin-arm64-115/binding.node' (no such file), '/Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/vendor/darwin-arm64-115/binding.node' (not a mach-o file)
npm error     at Module._extensions..node (node:internal/modules/cjs/loader:1454:18)
npm error     at Module.load (node:internal/modules/cjs/loader:1208:32)
npm error     at Module._load (node:internal/modules/cjs/loader:1024:12)
npm error     at Module.require (node:internal/modules/cjs/loader:1233:19)
npm error     at require (node:internal/modules/helpers:179:18)
npm error     at module.exports (/Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/lib/binding.js:19:10)
npm error     at Object.<anonymous> (/Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/lib/index.js:13:35)
npm error     at Module._compile (node:internal/modules/cjs/loader:1358:14)
npm error     at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
npm error     at Module.load (node:internal/modules/cjs/loader:1208:32) {
npm error   code: 'ERR_DLOPEN_FAILED'
npm error }
npm error Building the binary locally
npm error Building: /Users/username/.nvm/versions/node/v20.16.0/bin/node /Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm error gyp info it worked if it ends with ok
npm error gyp verb cli [
npm error gyp verb cli   '/Users/username/.nvm/versions/node/v20.16.0/bin/node',
npm error gyp verb cli   '/Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp/bin/node-gyp.js',
npm error gyp verb cli   'rebuild',
npm error gyp verb cli   '--verbose',
npm error gyp verb cli   '--libsass_ext=',
npm error gyp verb cli   '--libsass_cflags=',
npm error gyp verb cli   '--libsass_ldflags=',
npm error gyp verb cli   '--libsass_library='
npm error gyp verb cli ]
npm error gyp info using [email protected]
npm error gyp info using [email protected] | darwin | arm64
npm error gyp verb command rebuild []
npm error gyp verb command clean []
npm error gyp verb clean removing "build" directory
npm error gyp verb command configure []
npm error gyp verb find Python Python is not set from command line or npm configuration
npm error gyp verb find Python Python is not set from environment variable PYTHON
npm error gyp verb find Python checking if "python3" can be used
npm error gyp verb find Python - executing "python3" to get executable path
npm error gyp verb find Python - executable path is "/usr/local/opt/[email protected]/bin/python3.12"
npm error gyp verb find Python - executing "/usr/local/opt/[email protected]/bin/python3.12" to get version
npm error gyp verb find Python - version is "3.12.4"
npm error gyp info find Python using Python version 3.12.4 found at "/usr/local/opt/[email protected]/bin/python3.12"
npm error gyp verb get node dir no --target version specified, falling back to host node version: 20.16.0
npm error gyp verb command install [ '20.16.0' ]
npm error gyp verb install input version string "20.16.0"
npm error gyp verb install installing version: 20.16.0
npm error gyp verb install --ensure was passed, so won't reinstall if already installed
npm error gyp verb install version is already installed, need to check "installVersion"
npm error gyp verb got "installVersion" 9
npm error gyp verb needs "installVersion" 9
npm error gyp verb install version is good
npm error gyp verb get node dir target node version installed: 20.16.0
npm error gyp verb build dir attempting to create "build" dir: /Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/build
npm error gyp verb build dir "build" dir needed to be created? Yes
npm error gyp verb build/config.gypi creating config file
npm error gyp verb build/config.gypi writing out config file: /Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/build/config.gypi
npm error gyp verb config.gypi checking for gypi file: /Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/config.gypi
npm error gyp verb common.gypi checking for gypi file: /Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/common.gypi
npm error gyp verb gyp gyp format was not specified; forcing "make"
npm error gyp info spawn /usr/local/opt/[email protected]/bin/python3.12
npm error gyp info spawn args [
npm error gyp info spawn args   '/Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args   'binding.gyp',
npm error gyp info spawn args   '-f',
npm error gyp info spawn args   'make',
npm error gyp info spawn args   '-I',
npm error gyp info spawn args   '/Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/build/config.gypi',
npm error gyp info spawn args   '-I',
npm error gyp info spawn args   '/Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args   '-I',
npm error gyp info spawn args   '/Users/username/Library/Caches/node-gyp/20.16.0/include/node/common.gypi',
npm error gyp info spawn args   '-Dlibrary=shared_library',
npm error gyp info spawn args   '-Dvisibility=default',
npm error gyp info spawn args   '-Dnode_root_dir=/Users/username/Library/Caches/node-gyp/20.16.0',
npm error gyp info spawn args   '-Dnode_gyp_dir=/Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp',
npm error gyp info spawn args   '-Dnode_lib_file=/Users/username/Library/Caches/node-gyp/20.16.0/<(target_arch)/node.lib',
npm error gyp info spawn args   '-Dmodule_root_dir=/Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass',
npm error gyp info spawn args   '-Dnode_engine=v8',
npm error gyp info spawn args   '--depth=.',
npm error gyp info spawn args   '--no-parallel',
npm error gyp info spawn args   '--generator-output',
npm error gyp info spawn args   'build',
npm error gyp info spawn args   '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error Traceback (most recent call last):
npm error   File "/Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp/gyp/gyp_main.py", line 42, in <module>
npm error     import gyp  # noqa: E402
npm error     ^^^^^^^^^^
npm error   File "/Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 9, in <module>
npm error     import gyp.input
npm error   File "/Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 19, in <module>
npm error     from distutils.version import StrictVersion
npm error ModuleNotFoundError: No module named 'distutils'
npm error gyp ERR! configure error 
npm error gyp ERR! stack Error: `gyp` failed with exit code: 1
npm error gyp ERR! stack     at ChildProcess.onCpExit (/Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp/lib/configure.js:259:16)
npm error gyp ERR! stack     at ChildProcess.emit (node:events:519:28)
npm error gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm error gyp ERR! System Darwin 23.4.0
npm error gyp ERR! command "/Users/username/.nvm/versions/node/v20.16.0/bin/node" "/Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm error gyp ERR! cwd /Users/username/.nvm/versions/node/v20.16.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass
npm error gyp ERR! node -v v20.16.0
npm error gyp ERR! node-gyp -v v8.4.1
npm error gyp ERR! not ok 
npm error Build failed with error code: 1
npm error A complete log of this run can be found in: /Users/username/.npm/_logs/2025-10-28T18_03_41_663Z-debug-0.log

Guinto avatar Oct 29 '25 16:10 Guinto

@Guinto it seems like you need to update your node verison. It says you're using v20.16.0 but it wants v20.18.1 or higher.

amfischer avatar Oct 31 '25 15:10 amfischer

The same error occurs with node 20.18.1 and 22.11.0

npm install -g @bigcommerce/stencil-cli
npm warn deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Node Sass is no longer supported. Please use `sass` or `sass-embedded` instead.
npm error code 1
npm error path /Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass
npm error command failed
npm error command sh -c node scripts/build.js
npm error Binary found at /Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/vendor/darwin-arm64-115/binding.node
npm error Testing binary
npm error Binary has a problem: Error: dlopen(/Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/vendor/darwin-arm64-115/binding.node, 0x0001): tried: '/Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/vendor/darwin-arm64-115/binding.node' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/vendor/darwin-arm64-115/binding.node' (no such file), '/Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/vendor/darwin-arm64-115/binding.node' (not a mach-o file)
npm error     at Module._extensions..node (node:internal/modules/cjs/loader:1586:18)
npm error     at Module.load (node:internal/modules/cjs/loader:1288:32)
npm error     at Module._load (node:internal/modules/cjs/loader:1104:12)
npm error     at Module.require (node:internal/modules/cjs/loader:1311:19)
npm error     at require (node:internal/modules/helpers:179:18)
npm error     at module.exports (/Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/lib/binding.js:19:10)
npm error     at Object.<anonymous> (/Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/lib/index.js:13:35)
npm error     at Module._compile (node:internal/modules/cjs/loader:1469:14)
npm error     at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
npm error     at Module.load (node:internal/modules/cjs/loader:1288:32) {
npm error   code: 'ERR_DLOPEN_FAILED'
npm error }
npm error Building the binary locally
npm error Building: /Users/username/.nvm/versions/node/v20.18.1/bin/node /Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm error gyp info it worked if it ends with ok
npm error gyp verb cli [
npm error gyp verb cli   '/Users/username/.nvm/versions/node/v20.18.1/bin/node',
npm error gyp verb cli   '/Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp/bin/node-gyp.js',
npm error gyp verb cli   'rebuild',
npm error gyp verb cli   '--verbose',
npm error gyp verb cli   '--libsass_ext=',
npm error gyp verb cli   '--libsass_cflags=',
npm error gyp verb cli   '--libsass_ldflags=',
npm error gyp verb cli   '--libsass_library='
npm error gyp verb cli ]
npm error gyp info using [email protected]
npm error gyp info using [email protected] | darwin | arm64
npm error gyp verb command rebuild []
npm error gyp verb command clean []
npm error gyp verb clean removing "build" directory
npm error gyp verb command configure []
npm error gyp verb find Python Python is not set from command line or npm configuration
npm error gyp verb find Python Python is not set from environment variable PYTHON
npm error gyp verb find Python checking if "python3" can be used
npm error gyp verb find Python - executing "python3" to get executable path
npm error gyp verb find Python - executable path is "/usr/local/opt/[email protected]/bin/python3.12"
npm error gyp verb find Python - executing "/usr/local/opt/[email protected]/bin/python3.12" to get version
npm error gyp verb find Python - version is "3.12.4"
npm error gyp info find Python using Python version 3.12.4 found at "/usr/local/opt/[email protected]/bin/python3.12"
npm error gyp verb get node dir no --target version specified, falling back to host node version: 20.18.1
npm error gyp verb command install [ '20.18.1' ]
npm error gyp verb install input version string "20.18.1"
npm error gyp verb install installing version: 20.18.1
npm error gyp verb install --ensure was passed, so won't reinstall if already installed
npm error gyp verb install version is already installed, need to check "installVersion"
npm error gyp verb got "installVersion" 9
npm error gyp verb needs "installVersion" 9
npm error gyp verb install version is good
npm error gyp verb get node dir target node version installed: 20.18.1
npm error gyp verb build dir attempting to create "build" dir: /Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/build
npm error gyp verb build dir "build" dir needed to be created? Yes
npm error gyp verb build/config.gypi creating config file
npm error gyp verb build/config.gypi writing out config file: /Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/build/config.gypi
npm error gyp verb config.gypi checking for gypi file: /Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/config.gypi
npm error gyp verb common.gypi checking for gypi file: /Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/common.gypi
npm error gyp verb gyp gyp format was not specified; forcing "make"
npm error gyp info spawn /usr/local/opt/[email protected]/bin/python3.12
npm error gyp info spawn args [
npm error gyp info spawn args   '/Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args   'binding.gyp',
npm error gyp info spawn args   '-f',
npm error gyp info spawn args   'make',
npm error gyp info spawn args   '-I',
npm error gyp info spawn args   '/Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass/build/config.gypi',
npm error gyp info spawn args   '-I',
npm error gyp info spawn args   '/Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args   '-I',
npm error gyp info spawn args   '/Users/username/Library/Caches/node-gyp/20.18.1/include/node/common.gypi',
npm error gyp info spawn args   '-Dlibrary=shared_library',
npm error gyp info spawn args   '-Dvisibility=default',
npm error gyp info spawn args   '-Dnode_root_dir=/Users/username/Library/Caches/node-gyp/20.18.1',
npm error gyp info spawn args   '-Dnode_gyp_dir=/Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp',
npm error gyp info spawn args   '-Dnode_lib_file=/Users/username/Library/Caches/node-gyp/20.18.1/<(target_arch)/node.lib',
npm error gyp info spawn args   '-Dmodule_root_dir=/Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass',
npm error gyp info spawn args   '-Dnode_engine=v8',
npm error gyp info spawn args   '--depth=.',
npm error gyp info spawn args   '--no-parallel',
npm error gyp info spawn args   '--generator-output',
npm error gyp info spawn args   'build',
npm error gyp info spawn args   '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error Traceback (most recent call last):
npm error   File "/Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp/gyp/gyp_main.py", line 42, in <module>
npm error     import gyp  # noqa: E402
npm error     ^^^^^^^^^^
npm error   File "/Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 9, in <module>
npm error     import gyp.input
npm error   File "/Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 19, in <module>
npm error     from distutils.version import StrictVersion
npm error ModuleNotFoundError: No module named 'distutils'
npm error gyp ERR! configure error 
npm error gyp ERR! stack Error: `gyp` failed with exit code: 1
npm error gyp ERR! stack     at ChildProcess.onCpExit (/Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp/lib/configure.js:259:16)
npm error gyp ERR! stack     at ChildProcess.emit (node:events:518:28)
npm error gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm error gyp ERR! System Darwin 23.4.0
npm error gyp ERR! command "/Users/username/.nvm/versions/node/v20.18.1/bin/node" "/Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm error gyp ERR! cwd /Users/username/.nvm/versions/node/v20.18.1/lib/node_modules/@bigcommerce/stencil-cli/node_modules/node-sass
npm error gyp ERR! node -v v20.18.1
npm error gyp ERR! node-gyp -v v8.4.1
npm error gyp ERR! not ok 
npm error Build failed with error code: 1
npm error A complete log of this run can be found in: /Users/username/.npm/_logs/2025-10-31T18_29_54_090Z-debug-0.log

Guinto avatar Oct 31 '25 18:10 Guinto

@Guinto looks like distutils is missing in the current python version. Worth checking https://github.com/bigcommerce/stencil-cli/issues/1251

jairo-bc avatar Nov 03 '25 14:11 jairo-bc

still happening, major issue for a client project

thatONEjustin avatar Dec 11 '25 05:12 thatONEjustin