I am trying to install node_modules on my Macbook with M2 chip and one of my package depends on node-sass internally.Believe me I want to get rid of node-sass and use sass instead but I can't do that right now. Has someone installed this combination successfully ?
I am using node v 14.21.3 , I have also tried with node v22 as well but same issue.
I have python 2 as v2.7 and python3 as v3.9.6.
I am attaching logs for reference,
Any help of reference would be highly appreciated.
> [email protected] install /Users/myusername.ts/Projects/myproject/mypackage/node_modules/node-sass
> node scripts/install.js
Downloading binary from .14.1/darwin-arm64-83_binding.node
Cannot download ".14.1/darwin-arm64-83_binding.node":
HTTP error 404 Not Found
Hint: If github is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=:1234
or configure npm proxy via
npm config set proxy :8080
> [email protected] postinstall /Users/myusername.ts/Projects/myproject/mypackage/node_modules/node-sass
> node scripts/build.js
Building: /Users/myusername.ts/.nvm/versions/node/v14.21.3/bin/node /Users/myusername.ts/Projects/myproject/mypackage/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 '/Users/myusername.ts/.nvm/versions/node/v14.21.3/bin/node',
gyp verb cli '/Users/myusername.ts/Projects/myproject/mypackage/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] | darwin | arm64
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 "/usr/bin/python3" in the PATH
gyp verb `which` succeeded /usr/bin/python3 /usr/bin/python3
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /usr/bin/python3 -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:383:12)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at maybeClose (internal/child_process.js:1088:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
gyp ERR! System Darwin 23.1.0
gyp ERR! command "/Users/myusername.ts/.nvm/versions/node/v14.21.3/bin/node" "/Users/myusername.ts/Projects/myproject/mypackage/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/myusername.ts/Projects/myproject/mypackage/node_modules/node-sass
gyp ERR! node -v v14.21.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok