-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please help solve issue with errors related to node-sass when running npm install #1251
Comments
Hi @mrosswog |
yes, unless i did this wrong: python3 -m pip install setuptools |
The actual error is |
Thanks for the response |
@mrosswog you may try to use |
Thank you for the tip, but before I try this - I uninstalled version 3.13 of Python so that's now out of the picture. I have version 3.9 and 2.7 that came with Mac OS. Do I still need to use the command you provided? I am still experiencing the same problems trying to use the system Python. Thank you very much |
Hello, any guidance on the issues below would be greatly appreciated.
Last year we updated our theme to get rid of any incompatible scss, and were able to go the rest of 2024 with routine updates, no problems.
For 2025 we are revamping our theme, and I am starting with a new, downloaded copy of the theme files.
I completely uninstalled and re-installed the correct versions of nvm, npm, and node.js, as well as BigCommerce Stencil CLI.
I see that BC now says Python is required, so I downloaded Python 3.13.1, installed and configured my .zshrc file.
When I run npm install in my theme directory, I get some confusing error messages. There is a set of messages about node-sass, and later some about node-gyp and python:
npm error code 1
npm error git dep preparation failed
npm error command /Users/xxxxxxxxxxxxxx/.nvm/versions/node/v20.16.0/bin/node /Users/xxxxxxxxxxxxxx/.nvm/versions/node/v20.16.0/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/Users/xxxxxxxxxxxxxx/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm error npm warn using --force Recommended protections disabled.
npm error npm warn ERESOLVE overriding peer dependency
npm error npm warn While resolving: [email protected]
npm error npm warn Found: [email protected]
npm error npm warn node_modules/node-sass
npm error npm warn dev node-sass@"^9.0.0" from the root project
npm error npm warn
npm error npm warn Could not resolve dependency:
npm error npm warn peer node-sass@"^3.4.2" from [email protected]
npm error npm warn node_modules/sass-loader
npm error npm warn dev sass-loader@"^3.2.0" from the root project
npm error npm warn
npm error npm warn Conflicting peer dependency: [email protected]
npm error npm warn node_modules/node-sass
npm error npm warn peer node-sass@"^3.4.2" from [email protected]
npm error npm warn node_modules/sass-loader
npm error npm warn dev sass-loader@"^3.2.0" from the root project
npm error npm warn deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm error npm warn deprecated [email protected]: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
npm error npm warn deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm error npm warn deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm error npm warn deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm error npm warn deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm error npm warn deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm error npm warn deprecated [email protected]: flatten is deprecated in favor of utility frameworks such as lodash.
npm error npm warn deprecated [email protected]: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2
npm error npm warn deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm error npm warn deprecated [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm error npm warn deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm error npm warn deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm error npm error code 1
npm error npm error path /Users/xxxxxxxxxxxxxx/.npm/_cacache/tmp/git-cloneHmBVytDavkmn/node_modules/node-sass
npm error npm error command failed
npm error npm error command sh -c node scripts/build.js
npm error npm error Building: /Users/xxxxxxxxxxxxxx/.nvm/versions/node/v20.16.0/bin/node /Users/xxxxxxxxxxxxxx/.npm/_cacache/tmp/git-cloneHmBVytDavkmn/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm error npm error c++ -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/Users/xxxxxxxxxxxxxx/Library/Caches/node-gyp/20.16.0/include/node -I/Users/xxxxxxxxxxxxxx/Library/Caches/node-gyp/20.16.0/src -I/Users/xxxxxxxxxxxxxx/Library/Caches/node-gyp/20.16.0/deps/openssl/config -I/Users/xxxxxxxxxxxxxx/Library/Caches/node-gyp/20.16.0/deps/openssl/openssl/include -I/Users/xxxxxxxxxxxxxx/Library/Caches/node-gyp/20.16.0/deps/uv/include -I/Users/xxxxxxxxxxxxxx/Library/Caches/node-gyp/20.16.0/deps/zlib -I/Users/xxxxxxxxxxxxxx/Library/Caches/node-gyp/20.16.0/deps/v8/include -I../src/libsass/include -O3 -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw -c
npm error npm error gyp info it worked if it ends with ok
npm error npm error gyp verb cli [
npm error npm error gyp verb cli '/Users/xxxxxxxxxxxxxx/.nvm/versions/node/v20.16.0/bin/node',
npm error npm error gyp verb cli '/Users/xxxxxxxxxxxxxx/.npm/_cacache/tmp/git-cloneHmBVytDavkmn/node_modules/node-gyp/bin/node-gyp.js',
npm error npm error gyp verb cli 'rebuild',
npm error npm error gyp verb cli '--verbose',
npm error npm error gyp verb cli '--libsass_ext=',
npm error npm error gyp verb cli '--libsass_cflags=',
npm error npm error gyp verb cli '--libsass_ldflags=',
npm error npm error gyp verb cli '--libsass_library='
npm error npm error gyp verb cli ]
npm error npm error gyp info using [email protected]
npm error npm error gyp info using [email protected] | darwin | x64
npm error npm error gyp verb command rebuild []
npm error npm error gyp verb command clean []
npm error npm error gyp verb clean removing "build" directory
npm error npm error gyp verb command configure []
npm error npm error gyp verb find Python Python is not set from command line or npm configuration
npm error npm error gyp verb find Python checking Python explicitly set from environment variable PYTHON
npm error npm error gyp verb find Python - process.env.PYTHON is "/usr/bin/python3"
npm error npm error gyp verb find Python - executing "/usr/bin/python3" to get executable path
npm error npm error gyp verb find Python - executable path is "/Library/Developer/CommandLineTools/usr/bin/python3"
npm error npm error gyp verb find Python - executing "/Library/Developer/CommandLineTools/usr/bin/python3" to get version
npm error npm error gyp verb find Python - version is "3.9.6"
npm error npm error gyp info find Python using Python version 3.9.6 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
npm error npm error gyp verb get node dir no --target version specified, falling back to host node version: 20.16.0
npm error npm error gyp verb command install [ '20.16.0' ]
npm error npm error gyp verb install input version string "20.16.0"
npm error npm error gyp verb install installing version: 20.16.0
npm error npm error gyp verb install --ensure was passed, so won't reinstall if already installed
npm error npm error gyp verb install version is already installed, need to check "installVersion"
npm error npm error gyp verb got "installVersion" 11
npm error npm error gyp verb needs "installVersion" 9
npm error npm error gyp verb install version is good
npm error npm error gyp verb get node dir target node version installed: 20.16.0
npm error npm error gyp verb build dir attempting to create "build" dir: /Users/xxxxxxxxxxxxxx/.npm/_cacache/tmp/git-cloneHmBVytDavkmn/node_modules/node-sass/build
npm error npm error gyp verb build dir "build" dir needed to be created? Yes
npm error npm error gyp verb build/config.gypi creating config file
npm error npm error gyp verb build/config.gypi writing out config file: /Users/xxxxxxxxxxxxxx/.npm/_cacache/tmp/git-cloneHmBVytDavkmn/node_modules/node-sass/build/config.gypi
npm error npm error gyp verb config.gypi checking for gypi file: /Users/xxxxxxxxxxxxxx/.npm/_cacache/tmp/git-cloneHmBVytDavkmn/node_modules/node-sass/config.gypi
npm error npm error gyp verb common.gypi checking for gypi file: /Users/xxxxxxxxxxxxxx/.npm/_cacache/tmp/git-cloneHmBVytDavkmn/node_modules/node-sass/common.gypi
npm error npm error gyp verb gyp gyp format was not specified; forcing "make"
npm error npm error gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
npm error npm error gyp info spawn args [
npm error npm error gyp info spawn args '/Users/xxxxxxxxxxxxxx/.npm/_cacache/tmp/git-cloneHmBVytDavkmn/node_modules/node-gyp/gyp/gyp_main.py',
npm error npm error gyp info spawn args 'binding.gyp',
npm error npm error gyp info spawn args '-f',
npm error npm error gyp info spawn args 'make',
npm error npm error gyp info spawn args '-I',
npm error npm error gyp info spawn args '/Users/xxxxxxxxxxxxxx/.npm/_cacache/tmp/git-cloneHmBVytDavkmn/node_modules/node-sass/build/config.gypi',
npm error npm error gyp info spawn args '-I',
npm error npm error gyp info spawn args '/Users/xxxxxxxxxxxxxx/.npm/_cacache/tmp/git-cloneHmBVytDavkmn/node_modules/node-gyp/addon.gypi',
npm error npm error gyp info spawn args '-I',
npm error npm error gyp info spawn args '/Users/xxxxxxxxxxxxxx/Library/Caches/node-gyp/20.16.0/include/node/common.gypi',
npm error npm error gyp info spawn args '-Dlibrary=shared_library',
npm error npm error gyp info spawn args '-Dvisibility=default',
npm error npm error gyp info spawn args '-Dnode_root_dir=/Users/xxxxxxxxxxxxxx/Library/Caches/node-gyp/20.16.0',
npm error npm error gyp info spawn args '-Dnode_gyp_dir=/Users/xxxxxxxxxxxxxx/.npm/_cacache/tmp/git-cloneHmBVytDavkmn/node_modules/node-gyp',
npm error npm error gyp info spawn args '-Dnode_lib_file=/Users/xxxxxxxxxxxxxx/Library/Caches/node-gyp/20.16.0/<(target_arch)/node.lib',
npm error npm error gyp info spawn args '-Dmodule_root_dir=/Users/xxxxxxxxxxxxxx/.npm/_cacache/tmp/git-cloneHmBVytDavkmn/node_modules/node-sass',
npm error npm error gyp info spawn args '-Dnode_engine=v8',
npm error npm error gyp info spawn args '--depth=.',
npm error npm error gyp info spawn args '--no-parallel',
npm error npm error gyp info spawn args '--generator-output',
npm error npm error gyp info spawn args 'build',
npm error npm error gyp info spawn args '-Goutput_dir=.'
npm error npm error gyp info spawn args ]
npm error npm error gyp verb command build []
npm error npm error gyp verb build type Release
npm error npm error gyp verb architecture x64
npm error npm error gyp verb node dev dir /Users/xxxxxxxxxxxxxx/Library/Caches/node-gyp/20.16.0
npm error npm error gyp verb
which
succeeded formake
/usr/bin/makenpm error npm error gyp info spawn make
npm error npm error gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
npm error npm error In file included from ../src/libsass/src/ast.cpp:1:
npm error npm error ../src/libsass/src/sass.hpp:49:10: fatal error: 'string' file not found
npm error npm error 49 | #include
npm error npm error | ^~~~~~~~
npm error npm error 1 error generated.
npm error npm error make: *** [Release/obj.target/libsass/src/libsass/src/ast.o] Error 1
npm error npm error gyp ERR! build error
npm error npm error gyp ERR! stack Error:
make
failed with exit code: 2npm error npm error gyp ERR! stack at ChildProcess.onExit (/Users/xxxxxxxxxxxxxx/.npm/_cacache/tmp/git-cloneHmBVytDavkmn/node_modules/node-gyp/lib/build.js:194:23)
npm error npm error gyp ERR! stack at ChildProcess.emit (node:events:519:28)
npm error npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm error npm error gyp ERR! System Darwin 23.6.0
npm error npm error gyp ERR! command "/Users/xxxxxxxxxxxxxx/.nvm/versions/node/v20.16.0/bin/node" "/Users/xxxxxxxxxxxxxx/.npm/_cacache/tmp/git-cloneHmBVytDavkmn/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm error npm error gyp ERR! cwd /Users/xxxxxxxxxxxxxx/.npm/_cacache/tmp/git-cloneHmBVytDavkmn/node_modules/node-sass
npm error npm error gyp ERR! node -v v20.16.0
npm error npm error gyp ERR! node-gyp -v v8.4.1
npm error npm error gyp ERR! not ok
npm error npm error Build failed with error code: 1
npm error npm error A complete log of this run can be found in: /Users/xxxxxxxxxxxxxx/.npm/_logs/2025-01-08T19_25_36_434Z-debug-0.log
npm error A complete log of this run can be found in: /Users/xxxxxxxxxxxxxx/.npm/_logs/2025-01-08T19_25_17_966Z-debug-0.log
The text was updated successfully, but these errors were encountered: