redhat-developer / redhat-developer/vscode-java

vscode-java doesn't build on Mac with Node 14

Open
#2,702 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

build/infra
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

Using the same node 14.19.1 as Jenkins, the project fails to build on my Mac.

❯ node --version
v14.19.1
❯ npm ci
npm WARN prepare removing existing node_modules/ before installation

> fsevents@1.2.13 install /Users/fbricon/Dev/projects/vscode-java/node_modules/glob-watcher/node_modules/fsevents
> node install.js

internal/modules/cjs/loader.js:905
  throw err;
  ^

Error: Cannot find module 'nan'
Require stack:
- /Users/fbricon/Dev/projects/vscode-java/node_modules/glob-watcher/node_modules/fsevents/[eval]
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at [eval]:1:1
    at Script.runInThisContext (vm.js:134:12)
    at Object.runInThisContext (vm.js:310:38)
    at internal/process/execution.js:81:19
    at [eval]-wrapper:6:22
    at evalScript (internal/process/execution.js:80:60) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/fbricon/Dev/projects/vscode-java/node_modules/glob-watcher/node_modules/fsevents/[eval]'
  ]
}
gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/fbricon/.nvm/versions/node/v14.19.1/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
gyp ERR! System Darwin 21.6.0
gyp ERR! command "/Users/fbricon/.nvm/versions/node/v14.19.1/bin/node" "/Users/fbricon/.nvm/versions/node/v14.19.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/fbricon/Dev/projects/vscode-java/node_modules/glob-watcher/node_modules/fsevents
gyp ERR! node -v v14.19.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
added 875 packages in 13.275s

It builds when I start using Node 16

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Reproduce the failure on macOS with Node 14.19.1 using npm ci, then inspect the fsevents installation error involving the missing nan module. Done means the project installs and builds successfully with the Node version used by Jenkins.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.