electron-userland / spectron

DEPRECATED: 🔎 Test Electron apps using ChromeDriver
http://electronjs.org/spectron
MIT License
1.68k stars 229 forks source link

npm install of spectron fails on node v14.0.0, mac osx 10.14.6 #622

Open ivanixgames opened 4 years ago

ivanixgames commented 4 years ago

npm install --save-dev spectron fails when using node v14.0.0 on mac 10.14.6

core-js@3.6.5 postinstall /Work/Projects/Patty/figma_plugin_ws/spectron/node_modules/core-js node -e "try{require('./postinstall')}catch(e){}"

spectron@11.0.0 postinstall /Work/Projects/Patty/figma_plugin_ws/spectron/node_modules/spectron node lib/rpath-fix.js

npm WARN spectron-demo@1.0.0 No description npm WARN spectron-demo@1.0.0 No repository field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! spectron@11.0.0 postinstall: node lib/rpath-fix.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the spectron@11.0.0 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

AMDZEN3 commented 4 years ago

I'm having this issue as well. Good to know its not just me.

AMDZEN3 commented 4 years ago

Does anyone know of a work around for this? Its the only thing preventing us from updating to Electron 9.

CodeRabbitYu commented 4 years ago

Mee To

pethee commented 4 years ago

Having the same issue, was about to post it when I saw this topic.

ccsrvs commented 4 years ago

We are actively troubleshooting this on a machine right now. Individual recently updated to Catalina. I realize the issue states for 10.14, but the error is the same and just stated for context.

Believe it to be related to not having xcode installed properly. From your terminal window, try running the command install_name_tool. If you receive a message about command line tools and missing xcrun, then see this blog: https://ma.ttias.be/mac-os-xcrun-error-invalid-active-developer-path-missing-xcrun/

You might also try reinstalling full xcode: https://wilsonmar.github.io/xcode/

I have 10.14 on my mac with full xcode and not experiencing this issue.

AMDZEN3 commented 4 years ago

We are actively troubleshooting this on a machine right now. Individual recently updated to Catalina. I realize the issue states for 10.14, but the error is the same and just stated for context.

Believe it to be related to not having xcode installed properly. From your terminal window, try running the command install_name_tool. If you receive a message about command line tools and missing xcrun, then see this blog: https://ma.ttias.be/mac-os-xcrun-error-invalid-active-developer-path-missing-xcrun/

You might also try reinstalling full xcode: https://wilsonmar.github.io/xcode/

I have 10.14 on my mac with full xcode and not experiencing this issue.

Thanks for the suggestion, but updating xcode on our machine doesn't seem to fix the issue.

ccsrvs commented 4 years ago

We are actively troubleshooting this on a machine right now. Individual recently updated to Catalina. I realize the issue states for 10.14, but the error is the same and just stated for context. Believe it to be related to not having xcode installed properly. From your terminal window, try running the command install_name_tool. If you receive a message about command line tools and missing xcrun, then see this blog: https://ma.ttias.be/mac-os-xcrun-error-invalid-active-developer-path-missing-xcrun/ You might also try reinstalling full xcode: https://wilsonmar.github.io/xcode/ I have 10.14 on my mac with full xcode and not experiencing this issue.

Thanks for the suggestion, but updating xcode on our machine doesn't seem to fix the issue.

Sorry. This worked for our issue. We fully uninstalled xcode and reinstalled 11.5 and it started working for us.

ckcks12 commented 4 years ago

This happened to me and my coworker. He has Node 14.0.0 and Mac OSX 10.15.4. And I have Node 14.0.0 and Mac OSX 10.15.3 (19D76).

And I didn't want to spend my time on version issues. So I downgraded my node to 13.12.0.

AMDZEN3 commented 4 years ago

This happened to me and my coworker. He has Node 14.0.0 and Mac OSX 10.15.4. And I have Node 14.0.0 and Mac OSX 10.15.3 (19D76).

And I didn't want to spend my time on version issues. So I downgraded my node to 13.12.0.

Thank you! It didn't occur to me the version of Node.js was the issue. I upgraded from 14.0 to 14.5 and that did the trick.

Valandur commented 4 years ago

I'm having this issue when using github actions with the macos-latest runner. I have npm setup with this step:

- name: Setup node
  uses: actions/setup-node@v1
  with:
    node-version: '12'
    registry-url: 'https://myregistry.com/company/'
    scope: myscope

It works when having the step as follows:

- name: Install node modules
  run: npm install

But fails when doing it like this:

- name: Install node modules
  run: npm install --ignore-scripts

- name: Run node post install scripts
  run: npm rebuild && npm run prepare --if-present

Splitting install into two steps is the recommended way to go when using private package registries so that scripts can't see the NPM_TOKEN env variable.

muzir commented 4 years ago

We are actively troubleshooting this on a machine right now. Individual recently updated to Catalina. I realize the issue states for 10.14, but the error is the same and just stated for context.

Believe it to be related to not having xcode installed properly. From your terminal window, try running the command install_name_tool. If you receive a message about command line tools and missing xcrun, then see this blog: https://ma.ttias.be/mac-os-xcrun-error-invalid-active-developer-path-missing-xcrun/

You might also try reinstalling full xcode: https://wilsonmar.github.io/xcode/

I have 10.14 on my mac with full xcode and not experiencing this issue.

I have the same issue with following versions; macOS catalina 14.15.6 node v12.18.3

After install the Xcode toolkit, issue is fixed. xcode-select --install

linonetwo commented 3 years ago

Thank you

xcode-select --install

fixes this. It didn't take effect immediately, it works after a full restart.

mx51damon commented 2 years ago

works for me

We are actively troubleshooting this on a machine right now. Individual recently updated to Catalina. I realize the issue states for 10.14, but the error is the same and just stated for context. Believe it to be related to not having xcode installed properly. From your terminal window, try running the command install_name_tool. If you receive a message about command line tools and missing xcrun, then see this blog: https://ma.ttias.be/mac-os-xcrun-error-invalid-active-developer-path-missing-xcrun/ You might also try reinstalling full xcode: https://wilsonmar.github.io/xcode/ I have 10.14 on my mac with full xcode and not experiencing this issue.

I have the same issue with following versions; macOS catalina 14.15.6 node v12.18.3

After install the Xcode toolkit, issue is fixed. xcode-select --install

Works for me, good solution 👍