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

yarn install node-gyp errors only with vscode source yarn.lock files #91590

Closed
nrayburn-tech opened this issue Feb 26, 2020 · 4 comments
Closed
Labels
info-needed Issue requires more information from poster

Comments

@nrayburn-tech
Copy link
Contributor

Issue Type: Bug

Using yarn install to build vscode throws node-gyp errors when using the yarn.lock files from within the repo. Removing the yarn.lock files and then running yarn install works successfully.
Deleting ~/.node-gyp and running yarn cache clean doesn't seem to make a difference.

  1. Clone vscode
  2. Run yarn install from the vscode directory (I use sudo yarn install, otherwise I receive an EACCESS permission denied error.)
  3. node-gyp throws multiple errors.
  4. Remove the yarn.lock files from the vscode source. (From inside the vscode directory, I use "find . -name "yarn.lock" -exec rm -rf '{}' +" This removes the files from vscode, but not from node_modules.)
  5. Run yarn install again.
  6. New yarn.lock files are created and the install completes without error.

This seems to me that when doing yarn install without the lock files, I receive newer versions and this resolves the issue.

If any of the log information is needed, I can provide that.

VS Code version: Code 1.42.1 (c47d83b, 2020-02-11T14:44:27.652Z)
OS version: Darwin x64 19.3.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2800)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 7, 5, 3
Memory (System) 16.00GB (4.17GB free)
Process Argv
Screen Reader no
VM 0%
@roblourens
Copy link
Member

What are the errors?

@roblourens roblourens added the info-needed Issue requires more information from poster label Feb 26, 2020
@nrayburn-tech
Copy link
Contributor Author

Scrolling through them, it looks like it is for an optional fsevents each time.

This warning is followed by a lot of errors from inside fsevents .cc and .h files. I have excluded these due to their length.

warning Error running install script for optional dependency: "/Users/nrayburn/Documents/github/vscode/node_modules/watchpack/node_modules/fsevents: Command failed.
Exit code: 1
Command: node install
Arguments: 
Directory: /Users/nrayburn/Documents/github/vscode/node_modules/watchpack/node_modules/fsevents
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.10.0
node-pre-gyp info using node@10.18.0 | darwin | x64
node-pre-gyp info check checked for \"/Users/nrayburn/Documents/github/vscode/node_modules/watchpack/node_modules/fsevents/lib/binding/Release/electron-v7.1-darwin-x64/fse.node\" (not found)
node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-electron-v7.1-darwin-x64.tar.gz
node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-electron-v7.1-darwin-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-electron-v7.1-darwin-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for fsevents@1.2.4 and electron@7.1.11 (electron-v7.1 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.4/fse-v1.2.4-electron-v7.1-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@10.18.0 | 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@10.18.0 | darwin | x64
gyp info find Python using Python version 2.7.16 found at \"/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python\"
gyp info spawn /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
gyp info spawn args [ '/Users/nrayburn/.nvm/versions/node/v10.18.0/lib/node_modules/npm/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   '/Users/nrayburn/Documents/github/vscode/node_modules/watchpack/node_modules/fsevents/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/nrayburn/.nvm/versions/node/v10.18.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/nrayburn/Library/Caches/node-gyp/7.1.11/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/nrayburn/Library/Caches/node-gyp/7.1.11',
gyp info spawn args   '-Dnode_gyp_dir=/Users/nrayburn/.nvm/versions/node/v10.18.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/nrayburn/Library/Caches/node-gyp/7.1.11/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/nrayburn/Documents/github/vscode/node_modules/watchpack/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 ok 
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.5
gyp info using node@10.18.0 | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o

fatal error: too many errors emitted, stopping now [-ferror-limit=]
4 warnings and 20 errors generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/nrayburn/.nvm/versions/node/v10.18.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:191:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 19.3.0
gyp ERR! command \"/Users/nrayburn/.nvm/versions/node/v10.18.0/bin/node\" \"/Users/nrayburn/.nvm/versions/node/v10.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/nrayburn/Documents/github/vscode/node_modules/watchpack/node_modules/fsevents/lib/binding/Release/electron-v7.1-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/nrayburn/Documents/github/vscode/node_modules/watchpack/node_modules/fsevents/lib/binding/Release/electron-v7.1-darwin-x64\" \"--napi_version=5\" \"--node_abi_napi=napi\"
gyp ERR! cwd /Users/nrayburn/Documents/github/vscode/node_modules/watchpack/node_modules/fsevents
gyp ERR! node -v v10.18.0
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 '/Users/nrayburn/.nvm/versions/node/v10.18.0/bin/node /Users/nrayburn/.nvm/versions/node/v10.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/nrayburn/Documents/github/vscode/node_modules/watchpack/node_modules/fsevents/lib/binding/Release/electron-v7.1-darwin-x64/fse.node --module_name=fse --module_path=/Users/nrayburn/Documents/github/vscode/node_modules/watchpack/node_modules/fsevents/lib/binding/Release/electron-v7.1-darwin-x64 --napi_version=5 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/nrayburn/Documents/github/vscode/node_modules/watchpack/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:982:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Darwin 19.3.0
node-pre-gyp ERR! command \"/Users/nrayburn/.nvm/versions/node/v10.18.0/bin/node\" \"/Users/nrayburn/Documents/github/vscode/node_modules/watchpack/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
node-pre-gyp ERR! cwd /Users/nrayburn/Documents/github/vscode/node_modules/watchpack/node_modules/fsevents
node-pre-gyp ERR! node -v v10.18.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok 

I receive similar errors two more times. These are the only differences that I see.

Directory: /Users/nrayburn/Documents/github/vscode/node_modules/glob-watcher/node_modules/fsevents
node-pre-gyp info using node-pre-gyp@0.10.3
Directory: /Users/nrayburn/Documents/github/vscode/extensions/markdown-language-features/node_modules/fsevents
node-pre-gyp info using node-pre-gyp@0.6.39

@roblourens
Copy link
Member

It looks like the errors are just related to fsevents which is an optional devDependency. I've had issues building that too, but you can still build vscode without it right?

@nrayburn-tech
Copy link
Contributor Author

Yes, I never noticed the optional part until I was copying the messages. I assume the errors will go away once vscode moves towards whatever newer version the fresh yarn install pulls.

This can be closed, unless you want any more information about the versions that install and work.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants