vue-plyr icon indicating copy to clipboard operation
vue-plyr copied to clipboard

Fails to `npm install` on node v16

Open jpaav opened this issue 2 years ago • 1 comments

We were getting this error for a while, which seemed to be trying to call python3 with what is clearly python2 code. Eventually we figured out that the fix was to downgrade from node v16 to node v12. We didn't test v14 or v15.

npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /home/ubuntu/.npm/_cacache/tmp/git-clone-3bc3db00/node_modules/node-sass
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c node scripts/build.js
npm ERR! npm ERR! Building: /home/ubuntu/.nvm/versions/node/v16.3.0/bin/node /home/ubuntu/.npm/_cacache/tmp/git-clone-3bc3db00/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! npm ERR! gyp info it worked if it ends with ok
npm ERR! npm ERR! gyp verb cli [
npm ERR! npm ERR! gyp verb cli   '/home/ubuntu/.nvm/versions/node/v16.3.0/bin/node',
npm ERR! npm ERR! gyp verb cli   '/home/ubuntu/.npm/_cacache/tmp/git-clone-3bc3db00/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! npm ERR! gyp verb cli   'rebuild',
npm ERR! npm ERR! gyp verb cli   '--verbose',
npm ERR! npm ERR! gyp verb cli   '--libsass_ext=',
npm ERR! npm ERR! gyp verb cli   '--libsass_cflags=',
npm ERR! npm ERR! gyp verb cli   '--libsass_ldflags=',
npm ERR! npm ERR! gyp verb cli   '--libsass_library='
npm ERR! npm ERR! gyp verb cli ]
npm ERR! npm ERR! gyp info using [email protected]
npm ERR! npm ERR! gyp info using [email protected] | linux | x64
npm ERR! npm ERR! gyp verb command rebuild []
npm ERR! npm ERR! gyp verb command clean []
npm ERR! npm ERR! gyp verb clean removing "build" directory
npm ERR! npm ERR! gyp verb command configure []
npm ERR! npm ERR! gyp verb check python checking for Python executable "/usr/bin/python3" in the PATH
npm ERR! npm ERR! gyp verb `which` succeeded /usr/bin/python3 /usr/bin/python3
npm ERR! npm ERR! gyp ERR! configure error
npm ERR! npm ERR! gyp ERR! stack Error: Command failed: /usr/bin/python3 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! npm ERR! gyp ERR! stack   File "<string>", line 1
npm ERR! npm ERR! gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! npm ERR! gyp ERR! stack                       ^
npm ERR! npm ERR! gyp ERR! stack SyntaxError: invalid syntax
npm ERR! npm ERR! gyp ERR! stack
npm ERR! npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:326:12)
npm ERR! npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
npm ERR! npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1067:16)
npm ERR! npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! npm ERR! gyp ERR! System Linux 5.4.0-1045-aws
npm ERR! npm ERR! gyp ERR! command "/home/ubuntu/.nvm/versions/node/v16.3.0/bin/node" "/home/ubuntu/.npm/_cacache/tmp/git-clone-3bc3db00/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! npm ERR! gyp ERR! cwd /home/ubuntu/.npm/_cacache/tmp/git-clone-3bc3db00/node_modules/node-sass
npm ERR! npm ERR! gyp ERR! node -v v16.3.0
npm ERR! npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! npm ERR! gyp ERR! not ok
npm ERR! npm ERR! Build failed with error code: 1

Our issue is fixed, but I thought it would be good to post an issue here in case someone else is having the same problem, since it is not obvious that downgrading node will fix it.

jpaav avatar Jul 30 '21 14:07 jpaav

As for me a fork of repo solves problem, at least temporary

zapalagrzegorz avatar Aug 19 '21 13:08 zapalagrzegorz