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

installation ends abruptly with notice to update Node #9614

Closed
mbkv opened this issue Sep 9, 2020 · 4 comments · Fixed by #11057
Closed

installation ends abruptly with notice to update Node #9614

mbkv opened this issue Sep 9, 2020 · 4 comments · Fixed by #11057

Comments

@mbkv
Copy link

mbkv commented Sep 9, 2020

Describe the bug

I installed node with "snap" for ubuntu. npx create-react-app fails claiming I need to update my node version

You are running Node v15.0.0-nightly202009086f2af08245.
Create React App requires Node >=4 or higher. 
Please update your version of Node.

This is most likely coming from the following check. you might be able to get semver to coerce the string first, and then perform the check

Which terms did you search for in User Guide?

both "npx" and "You are running Node"

Environment

  current version of create-react-app: 3.4.1
  running from $HOME/.config/yarn/global/node_modules/create-react-app
(node:133962) [DEP0139] DeprecationWarning: Calling process.umask() with no arguments is prone to race conditions and is a potential security vulnerability.
(Use `node --trace-deprecation ...` to show where the warning was created)

  System:
    OS: Linux 5.4 Ubuntu 20.04.1 LTS (Focal Fossa)
    CPU: (16) x64 AMD Ryzen 7 1800X Eight-Core Processor
  Binaries:
    Node: Not Found
    Yarn: Not Found
    npm: Not Found
  Browsers:
    Chrome: 84.0.4147.135
    Firefox: 80.0.1
  npmPackages:
    react: 16.13.1 => 16.13.1 
    react-dom: 16.13.1 => 16.13.1 
    react-scripts: 0.9.x => 0.9.5 
  npmGlobalPackages:
    create-react-app: Not Found

I don't know why node, yarn, npm show as not found. but

$ node --version
v15.0.0-nightly202009086f2af08245
$ npm --version
6.14.8
$ yarn --version
1.22.5

Steps to reproduce

  1. install node on an ubuntu machine, using snap
  2. npx create-react-app $(mktemp -d)

Expected behavior

for it to not fail

Actual behavior

it is failing

@stale
Copy link

stale bot commented Oct 12, 2020

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Oct 12, 2020
@RubenLaube-Pohto
Copy link

I had similar issues with snap node but was able to get past it by defining node version with npx like this:

npx -p node@12 -- npx create-react-app my-app --template typescript

Still would not allow me to set --use-npm but that I was able do manually after install.

$ npx create-react-app --info
npx: installed 97 in 3.567s

Environment Info:

  current version of create-react-app: 3.4.1
  running from $HOME/.npm/_npx/70670/lib/node_modules/create-react-app

  System:
    OS: Linux 5.4 Ubuntu 20.04.1 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
  Binaries:
    Node: Not Found
    Yarn: Not Found
    npm: Not Found
  Browsers:
    Chrome: 86.0.4240.75
    Firefox: 81.0
  npmPackages:
    react: ^16.14.0 => 16.14.0 
    react-dom: ^16.14.0 => 16.14.0 
    react-scripts: ^3.4.3 => 3.4.3 
  npmGlobalPackages:
    create-react-app: Not Found

$ npx -p node@12 -- npx create-react-app --info
npx: installed 97 in 3.856s

Environment Info:

  current version of create-react-app: 3.4.1
  running from $HOME/.npm/_npx/70486/lib/node_modules/create-react-app

  System:
    OS: Linux 5.4 Ubuntu 20.04.1 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
  Binaries:
    Node: 12.19.0 - ~/.npm/_npx/70410/bin/node
    Yarn: 1.22.10 - ~/.npm-global/bin/yarn
    npm: Not Found
  Browsers:
    Chrome: 86.0.4240.75
    Firefox: 81.0
  npmPackages:
    react: ^16.14.0 => 16.14.0 
    react-dom: ^16.14.0 => 16.14.0 
    react-scripts: ^3.4.3 => 3.4.3 
  npmGlobalPackages:
    create-react-app: Not Found

@stale stale bot removed the stale label Oct 16, 2020
@stale
Copy link

stale bot commented Dec 25, 2020

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@mrmckeb
Copy link
Contributor

mrmckeb commented Jun 5, 2021

Hi @mbkv, first i want to apologise that we didn't get to this sooner. I have a fix for this ready to merge - it was made easy by your research, helpfully pointing to the exact point of failure :)

I'm hoping this will be in 4.1, of not, it should be in 4.2.

See #11057.

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

Successfully merging a pull request may close this issue.

4 participants