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

Node v13 #291

Closed
alubbe opened this issue Oct 24, 2019 · 21 comments
Closed

Node v13 #291

alubbe opened this issue Oct 24, 2019 · 21 comments

Comments

@alubbe
Copy link

alubbe commented Oct 24, 2019

There are currently no pre-compiled binaries for node v13, so installation fails:

node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.12.0
node-pre-gyp info using node@13.0.1 | darwin | x64
node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp info check checked for \"/blabla/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64/fse.node\" (not found)
node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.9/fse-v1.2.9-node-v79-darwin-x64.tar.gz
node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.9/fse-v1.2.9-node-v79-darwin-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.9/fse-v1.2.9-node-v79-darwin-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for fsevents@1.2.9 and node@13.0.1 (node-v79 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.9/fse-v1.2.9-node-v79-darwin-x64.tar.gz 
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.5
gyp info using node@13.0.1 | darwin | x64
gyp info ok 
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.5
gyp info using node@13.0.1 | darwin | x64
gyp info find Python using Python version 3.6.7 found at \"/bla/.pyenv/versions/3.6.7/bin/python\"
gyp info spawn /bla/.pyenv/versions/3.6.7/bin/python
gyp info spawn args [
gyp info spawn args   '/blabla/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/blabla/node_modules/fsevents/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/blabla/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/bla/Library/Caches/node-gyp/13.0.1/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/bla/Library/Caches/node-gyp/13.0.1',
gyp info spawn args   '-Dnode_gyp_dir=/blabla/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/bla/Library/Caches/node-gyp/13.0.1/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/blabla/node_modules/fsevents',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
Traceback (most recent call last):
  File \"/blabla/node_modules/node-gyp/gyp/gyp_main.py\", line 50, in <module>
    sys.exit(gyp.script_main())
  File \"/blabla/node_modules/node-gyp/gyp/pylib/gyp/__init__.py\", line 554, in script_main
    return main(sys.argv[1:])
  File \"/blabla/node_modules/node-gyp/gyp/pylib/gyp/__init__.py\", line 547, in main
    return gyp_main(args)
  File \"/blabla/node_modules/node-gyp/gyp/pylib/gyp/__init__.py\", line 532, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File \"/blabla/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py\", line 2215, in GenerateOutput
    part_of_all=qualified_target in needed_targets)
  File \"/blabla/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py\", line 802, in Write
    self.WriteCopies(spec['copies'], extra_outputs, part_of_all)
  File \"/blabla/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py\", line 1145, in WriteCopies
    env = self.GetSortedXcodeEnv()
  File \"/blabla/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py\", line 1885, in GetSortedXcodeEnv
    additional_settings)
  File \"/blabla/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py\", line 1616, in GetSortedXcodeEnv
    additional_settings)
  File \"/blabla/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py\", line 1527, in _GetXcodeEnv
    if XcodeVersion() >= '0500' and not env.get('SDKROOT'):
TypeError: '>=' not supported between instances of 'tuple' and 'str'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/blabla/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command \"/bla/.nvm/versions/node/v13.0.1/bin/node\" \"/blabla/node_modules/node-gyp/bin/node-gyp.js\" \"configure\" \"--fallback-to-build\" \"--module=/blabla/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/blabla/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64\" \"--napi_version=5\" \"--node_abi_napi=napi\" \"--napi_build_version=0\" \"--node_napi_label=node-v79\"
gyp ERR! cwd /blabla/node_modules/fsevents
gyp ERR! node -v v13.0.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/bla/.nvm/versions/node/v13.0.1/bin/node /blabla/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/blabla/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64/fse.node --module_name=fse --module_path=/blabla/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v79' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/blabla/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1028:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Darwin 18.7.0
node-pre-gyp ERR! command \"/bla/.nvm/versions/node/v13.0.1/bin/node\" \"/blabla/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
node-pre-gyp ERR! cwd /blabla/node_modules/fsevents
node-pre-gyp ERR! node -v v13.0.1
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok 
@fitztrev
Copy link
Contributor

Not sure how the binaries get published. I think TravisCI used to do it but I'm not sure about Github Workflows. Is it just a matter of adding v13 here?

strategy:
matrix:
node-version: [8, 10, 12]

@paulmillr
Copy link
Member

You are trying to install fsevents v1, which is unsupported at this point. You will need to upgrade to fsevents v2. fsevents v2 doesn't download binaries from a shady AWS service. Big improvement.

@paulmillr
Copy link
Member

@pipobscure can we get v13 binaries published?

@ziishaned
Copy link

I solved the above issue by removing node_modules and .lock files:

rm -rf node_modules yarn.lock package-lock.json
PYTHON=python2 yarn install

@Dinuz
Copy link

Dinuz commented Nov 14, 2019

@pipobscure and @paulmillr this issue is still present and breaks vue cli installation on node 13. It also breaks installation with express.js or apollo. The package looks for the binaries but it cannot find them - you can fix it installing fsevents into the project directly as dependence, but I do think this is not the right approach (clearly the error will be put up again starting a new different project). Vue cli is installed with -g, and that dependence should be also installed g.

What do you guys think? Probably publishing the binaries in the shady AWS service for a bit longer until other publisher are up to speed with the new system (vers 2) it would be smart.

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.9/fse-v1.2.9-node-v79-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for fsevents@1.2.9 and node@13.1.0 (node-v79 ABI, unknown) (falling back to source compile with node-gyp)

The code runs, and it fails miserably. The other option is going back to node 12 last version, and it eliminates the issue (I guess the problem is just with the binaries that are not available).

node-pre-gyp WARN Using request for node-pre-gyp https download
[fsevents] Success: "...lib/node_modules/@vue/cli/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node" is installed via remote

Success with Node 12 - Failure with Node 13. Everything install greatly on Node 13 except fsevents.

@pipobscure
Copy link
Contributor

Hi all,

first off, new binaries will be coming, however it will take a bit.

There already is a new version v2.x that does not need new binaries on new node versions. This is already in chokidar v3.x.

So vue, apollo, etc. have the option to solve this for you permanently. If you could also raise an issue requesting the thing you installed to update to chokidar v3 with fsevents v2? This would solve the problem permanently, rather than the stopgap of releasing new binaries for every nee node version.

Thanks!

@chrber
Copy link

chrber commented Nov 22, 2019

Hi all,

first off, new binaries will be coming, however it will take a bit.

There already is a new version v2.x that does not need new binaries on new node versions. This is already in chokidar v3.x.

So vue, apollo, etc. have the option to solve this for you permanently. If you could also raise an issue requesting the thing you installed to update to chokidar v3 with fsevents v2? This would solve the problem permanently, rather than the stopgap of releasing new binaries for every nee node version.

Thanks!

I know nothing of node etc., just trying to get the pet-shop running. Is there a workaround of achieving to use v2.x. Could someone please write down the steps to achieve it?

@pipobscure
Copy link
Contributor

Nope, nothing has changed.

@paulmillr
Copy link
Member

@pipobscure ping ?

@timsully
Copy link

Any idea around when this will be fixed?

@pipobscure
Copy link
Contributor

This is not something to be "fixed". One needs to have XCode command-line tools installed in order to install/compile native modules.

There no longer are credentials for AWS. So the installs are actually a bit risky. In addition 1.2.x is really deprecated. I've just done a release that removes node-pre-gyp dependency and therefore the ability/failure to download prebuilt binaries.

@billyjanitsch
Copy link

@pipobscure did you intend to publish 1.2.11 to npm? There's a commit (909af26) but not a corresponding publish.

@pipobscure
Copy link
Contributor

Sorry, oversight. It’s been published

@billyjanitsch
Copy link

Thanks @pipobscure. It looks like there's an inconsistency between the 1.2.11 commit and the published version. Specifically, the published version declares a dependency on node-pre-gyp@* whereas the commit does not declare any dependency on node-pre-gyp.

You can confirm by running:

❯ npm view fsevents@1.2.11 dependencies
{ bindings: '^1.5.0', nan: '^2.12.1', 'node-pre-gyp': '*' }

Was this intentional?

@vyorkin
Copy link

vyorkin commented Jul 23, 2020

Could anyone give a quick TL;DR on how to fix this?

  1. Do A first
  2. Then do B
    ...
    ?

My error:

warning Error running install script for optional dependency: app/node_modules/fsevents: Command failed.
Exit code: 1
Command: node install
Arguments:
Directory: app/node_modules/fsevents
Output:
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v83-darwin-x64.tar.gz

My env:

  • Node v14.5.0
  • macOS 10.15.1 Beta (19B77a)
  • XCode tools version: xcode-select version 2370

@ziishaned I'm sorry, but this comment is helpless for me. Could you please elaborate on why it is necessary to remove the node_modules and lock files?

Please tell me you need more info about my environment etc.
Thank you.

@ziishaned
Copy link

@vyorkin try reinstalling xcode-select by doing following:

xcode-select --print-path
rm -rf {output from above command}
xcode-select --install

@ziishaned
Copy link

ziishaned commented Jul 23, 2020

Could anyone give a quick TL;DR on how to fix this?

  1. Do A first
  2. Then do B
    ...
    ?

My error:

warning Error running install script for optional dependency: app/node_modules/fsevents: Command failed.
Exit code: 1
Command: node install
Arguments:
Directory: app/node_modules/fsevents
Output:
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v83-darwin-x64.tar.gz

My env:

  • Node v14.5.0
  • macOS 10.15.1 Beta (19B77a)
  • XCode tools version: xcode-select version 2370

@ziishaned I'm sorry, but this comment is helpless for me. Could you please elaborate on why it is necessary to remove the node_modules and lock files?

Please tell me you need more info about my environment etc.
Thank you.

@vyorkin node-gyp currently only supports python 2 if you install npm dependencies using python 3 node-gyp build will fail. So to resolve this you need to explicitly tell node-gyp which python version it should use by setting env variable like following:

PYTHON=python2 yarn install

@vyorkin
Copy link

vyorkin commented Jul 23, 2020

@ziishaned Thank you, but as I can see here, here and here it is mentioned that node-gyp supports python3 as well:

node-gyp requires that you have installed a compatible version of Python, one of: v2.7, v3.5, v3.6, v3.7, or v3.8. If you have multiple Python versions installed, you can identify which Python version node-gyp should use in one of the following ways ...

This appears a bit odd and unclear to me.
I've tried reinstalling XCode Command-line tools following your steps above but still get the same error. Manually setting the PYTHON env var doesn't help, so running:

PYTHON=python2 yarn install

Gives me the same error mentioned above.

Some more details about my current env:

 ▲ ~ node-gyp list
gyp info it worked if it ends with ok
gyp info using node-gyp@7.0.0
gyp info using node@14.5.0 | darwin | x64
12.18.2
14.5.0
gyp info ok

I've tried to follow the Configuring Python Dependency guide.

Here is what I had before:

 △ ~ npm config get python
undefined

Then I've tried setting the path to python3 executable:

 ▲ ~ npm config set python $(whereis python3)
 ▲ ~ npm config get python
/usr/bin/python3

But got the same error. Then I've tried setting this path to python (2) executable:

 ▲ ~ npm config set python $(whereis python)
 ▲ ~ npm config get python
/usr/bin/python

But this doesn't help either -- same error.
(Same thing with python2 executable name).

Then I tried setting the env var:

export PYTHON=$(whereis python3)
▲ echo $PYTHON 
/usr/bin/python3

Same error. I would appreciate any further suggestions... Thank you.

@vyorkin
Copy link

vyorkin commented Jul 23, 2020

Anyway, it might be a good idea to add something (a troubleshooting guide?) about this to README of Wiki. I can help, but obviously I don't have enough knowledge about the source of this issue.

@ChrisMiaoMiao
Copy link

I solved the above issue by removing node_modules and .lock files:

rm -rf node_modules yarn.lock package-lock.json
PYTHON=python2 yarn install

it works for me.

@dep
Copy link

dep commented Jun 15, 2022

In my case, I solved this by adding resolutions for those two dependencies in my package.json:

"resolutions": {
    ...
    "**/fsevents": "2.3.2",
    "**/node-pre-gyp": "0.17.0",
    ...
}

Testing with a fresh rm -rf node_modules and yarn install built without errors.

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