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

Invalid version number Electron beta. #2253

Closed
ccorcos opened this issue Nov 5, 2020 · 9 comments
Closed

Invalid version number Electron beta. #2253

ccorcos opened this issue Nov 5, 2020 · 9 comments

Comments

@ccorcos
Copy link

ccorcos commented Nov 5, 2020

I'm using electron-builder and trying to build my app against electron@11.0.0-beta.19 and node-gyp is complaining about that version number.

  • Node Version: v12.18.3
  • Platform: macOS 11.0.1
  • Compiler: clang-1200.0.32.4
  • Module: cld
   gyp ERR! stack Error: Invalid version number: ^11.0.0-beta.19
    gyp ERR! stack     at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:56:25)
    gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:30:7
    gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:79:11)
    gyp ERR! System Darwin 20.1.0
    gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /Users/chet/Code/notion-next/build/desktop/node_modules/cld
    gyp ERR! node -v v12.18.3
    gyp ERR! node-gyp -v v5.1.0
    gyp ERR! not ok
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! cld@2.5.1 install: `node-gyp rebuild`
    npm ERR! Exit status 1
@cclauss
Copy link
Contributor

cclauss commented Nov 5, 2020

gyp ERR! node-gyp -v v5.1.0

Please upgrade node-gyp to a more current version.

@ccorcos
Copy link
Author

ccorcos commented Nov 6, 2020

Hmm. Good point, when I run npm ls, it says node-gyp@7.1.2 under electron-rebuild... Not sure where this is coming from... Also here:

$ cat node_modules/node-gyp/package.json | grep version
  "version": "7.1.2"

@ccorcos
Copy link
Author

ccorcos commented Nov 6, 2020

Do you know where /usr/local/lib/node_modules/npm/node_modules/ is coming from?

@rvagg
Copy link
Member

rvagg commented Nov 6, 2020

yes, that's the npm version of node-gyp, you can upgrade npm to get a newer node-gyp too - npm install npm -g

@rvagg
Copy link
Member

rvagg commented Nov 6, 2020

or download and install a newer version of Node.js which comes with a newer npm & node-gyp

@cclauss
Copy link
Contributor

cclauss commented Nov 27, 2020

@rvagg How should users resolve the Multiple node-gyp versions are installed on macOS and Linux?

@joaocgreis provided detailed instructions for Windows but I am unsure how to do the same on non-Windows platforms.

Is npm install npm -g always the best solution for macOS and Linux users?

@cclauss
Copy link
Contributor

cclauss commented Nov 27, 2020

@ccorcos Did these suggestions work for you? Can this issue be closed?

@ccorcos
Copy link
Author

ccorcos commented Nov 27, 2020

Yes, this worked. There was some wonkiness with electron-builder as well. Thanks.

@ccorcos ccorcos closed this as completed Nov 27, 2020
@rvagg
Copy link
Member

rvagg commented Dec 2, 2020

@cclauss #2272

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants