Skip to content
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

[Bug] Unable to install packages with "npm install" #120

Open
johnBrereton opened this issue Jul 31, 2023 · 0 comments
Open

[Bug] Unable to install packages with "npm install" #120

johnBrereton opened this issue Jul 31, 2023 · 0 comments

Comments

@johnBrereton
Copy link

Version

1.3.0

Reproduction link

https://demos.creative-tim.com/now-ui-kit-pro/docs/1.0/getting-started/build-tools.html

Operating System

MacOS

Device

MacBook Pro 14"

Browser & Version

Chrome 115.0.5790.110

Steps to reproduce

  1. Follow the instructions in the build tools section of docs running node@14
  2. Follow the instructions in the build tools section of docs running node@18 (latest stable)

What is expected?

Should install dependencies according to package.json file.

What is actually happening?

First attempted with node v18.17.0 and received the first error below, in an attempt to troubleshoot switched to node v14.21.3 and received the second error below.

Node v18.17.0:

npm ERR! code 1
npm ERR! path /Users/johnbrereton/Documents/Loopback/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /opt/homebrew/Cellar/node@18/18.17.0/bin/node /Users/johnbrereton/Documents/Loopback/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   '/opt/homebrew/Cellar/node@18/18.17.0/bin/node',
npm ERR! gyp verb cli   '/Users/johnbrereton/Documents/Loopback/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 [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
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 (/Users/johnbrereton/Documents/Loopback/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/Users/johnbrereton/Documents/Loopback/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/Users/johnbrereton/Documents/Loopback/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /Users/johnbrereton/Documents/Loopback/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /Users/johnbrereton/Documents/Loopback/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /Users/johnbrereton/Documents/Loopback/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:210:21)
npm ERR! gyp verb `which` failed  python2 Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (/Users/johnbrereton/Documents/Loopback/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/Users/johnbrereton/Documents/Loopback/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/Users/johnbrereton/Documents/Loopback/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /Users/johnbrereton/Documents/Loopback/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /Users/johnbrereton/Documents/Loopback/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /Users/johnbrereton/Documents/Loopback/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:210: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 (/Users/johnbrereton/Documents/Loopback/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/Users/johnbrereton/Documents/Loopback/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/Users/johnbrereton/Documents/Loopback/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /Users/johnbrereton/Documents/Loopback/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /Users/johnbrereton/Documents/Loopback/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /Users/johnbrereton/Documents/Loopback/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:210:21)
npm ERR! gyp verb `which` failed  python Error: not found: python
npm ERR! gyp verb `which` failed     at getNotFoundError (/Users/johnbrereton/Documents/Loopback/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/Users/johnbrereton/Documents/Loopback/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/Users/johnbrereton/Documents/Loopback/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /Users/johnbrereton/Documents/Loopback/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /Users/johnbrereton/Documents/Loopback/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /Users/johnbrereton/Documents/Loopback/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:210: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 (/Users/johnbrereton/Documents/Loopback/node_modules/node-gyp/lib/configure.js:484:19)
npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (/Users/johnbrereton/Documents/Loopback/node_modules/node-gyp/lib/configure.js:406:16)
npm ERR! gyp ERR! stack     at F (/Users/johnbrereton/Documents/Loopback/node_modules/which/which.js:68:16)
npm ERR! gyp ERR! stack     at E (/Users/johnbrereton/Documents/Loopback/node_modules/which/which.js:80:29)
npm ERR! gyp ERR! stack     at /Users/johnbrereton/Documents/Loopback/node_modules/which/which.js:89:16
npm ERR! gyp ERR! stack     at /Users/johnbrereton/Documents/Loopback/node_modules/isexe/index.js:42:5
npm ERR! gyp ERR! stack     at /Users/johnbrereton/Documents/Loopback/node_modules/isexe/mode.js:8:5
npm ERR! gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:210:21)
npm ERR! gyp ERR! System Darwin 22.5.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node@18/18.17.0/bin/node" "/Users/johnbrereton/Documents/Loopback/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /Users/johnbrereton/Documents/Loopback/node_modules/node-sass
npm ERR! gyp ERR! node -v v18.17.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

Node v14.21.3:

gyp ERR! configure error 
gyp ERR! stack Error: Command failed: /opt/homebrew/opt/[email protected]/libexec/bin/python -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: Missing parentheses in call to 'print'. Did you mean print(...)?
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 Socket.<anonymous> (internal/child_process.js:446:11)
gyp ERR! stack     at Socket.emit (events.js:400:28)
gyp ERR! stack     at Pipe.<anonymous> (net.js:686:12)
gyp ERR! System Darwin 22.5.0
gyp ERR! command "/opt/homebrew/Cellar/node@14/14.21.3_1/libexec/node" "/Users/johnbrereton/Documents/Loopback/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/johnbrereton/Documents/Loopback/node_modules/node-sass
gyp ERR! node -v v14.21.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
Build failed with error code: 1

Solution

Additional comments

@johnBrereton johnBrereton changed the title [Bug] Unable to install packages with "npm install [Bug] Unable to install packages with "npm install" Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant