Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Flow doesn't work with npm v5.4.0 #4733

Closed
someden opened this issue Aug 29, 2017 · 8 comments
Closed

Flow doesn't work with npm v5.4.0 #4733

someden opened this issue Aug 29, 2017 · 8 comments

Comments

@someden
Copy link

someden commented Aug 29, 2017

Is this a bug report?

Yes

Can you also reproduce the problem with npm 4.x?

There is no problem with npm 4.x and 5.3.0, only with npm 5.4.0.

Environment

node -v: v8.4.0
npm -v: v5.4.0
npm ls react-scripts: I tried with 1.0.10, 1.0.11 and 1.0.12
npm ls flow-bin: I tried with 0.52.0 and 0.53.1
Operating system: macOS Sierra v10.12.6

Steps to Reproduce

  1. In Terminal:
$ create-react-app test-flow
$ cd test-flow
$ npm install --save-dev flow-bin
  1. Add "flow": "flow" to the scripts section of your package.json.
  2. Run npm run flow init
  3. And you will see the error:
> test-flow@0.1.0 flow /Users/admin/Sites/test-flow
> flow "init"

internal/child_process.js:325
    throw errnoException(err, 'spawn');
    ^

Error: spawn EACCES
    at _errnoException (util.js:1041:11)
    at ChildProcess.spawn (internal/child_process.js:325:11)
    at exports.spawn (child_process.js:493:9)
    at Object.<anonymous> (/Users/admin/Sites/test-flow/node_modules/flow-bin/cli.js:17:3)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Function.Module.runMain (module.js:609:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test-flow@0.1.0 flow: `flow "init"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the test-flow@0.1.0 flow script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Flow worked good a few days ago (with react-scripts 1.0.10), but now it doesn't work (even with react-scripts 1.0.10).

@spencerhakim
Copy link

I was running into this same error after upgrading to Flow 0.54 today, but I was seeing really inconsistent success even between various versions of npm and flow-bin. I believe this issue is probably caused by npm/npm#18324

@navaru
Copy link

navaru commented Sep 2, 2017

Ran into the same issue, yarn global add flow-bin worked well.

@sandersky
Copy link

I ran into the same issue and overcame it by running chmod +x node_modules/flow-bin/flow-osx-v0.54.0/flow.

@StarryShark
Copy link

Thank you @sandersky your workaround/solution worked.

@lucamjj
Copy link

lucamjj commented Sep 5, 2017

Thank you @sandersky it worked for me as well.

@NigelGreenway
Copy link

Thank you @sandersky for the suggestion.

Looking forward to the fix as I don't want to be running chmod +x .... everytime 😉

@zeh
Copy link

zeh commented Sep 7, 2017

PSA: npm 5.4.1 has been released and it fixes this issue for me. It's npm i npm@latest -g time.

@charliedotau
Copy link

had same problem on mac with npm 5.4.0. updated npm to 5.5.1 then uninstalled flow and reinstalled now all good.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants