Skip to content

Create-react-app broken for Node.js v0.10 #6940

Closed
@tobiasbueschel

Description

@tobiasbueschel

Is this a bug report?

Yes, I've noticed that create-react-app currently breaks on Node v.0.10 due to its usage of chalk.

In 2017, @einarlove submitted a PR that upgraded Chalk #2847 and @gaearon pushed a fix to the same branch as CI was breaking: 3e688df which removed chalk as a dependency from packages/create-react-app/index.js so that users get a sensible error message when their Node.js version is not supported.

Eventually, the PR was closed and the fix hasn't made it into the repo yet.

Did you try recovering your dependencies?

Yes.

Which terms did you search for in User Guide?

See above for more details on my research for this issue.

Environment

This has been tested in a Docker environment running Node v0.10. Please see below for steps to reproduce the error.

Steps to Reproduce

  1. docker run -it node:0.10 bash
  2. npm install -g create-react-app
  3. create-react-app my-app

Expected Behavior

root@a3b41c9b59c3:/# create-react-app my-app
You are running Node 0.10.48.
Create React App requires Node 8 or higher.
Please update your version of Node.

Actual Behavior

root@a3b41c9b59c3:/# create-react-app my-app

/usr/local/lib/node_modules/create-react-app/node_modules/chalk/index.js:2
const escapeStringRegexp = require('escape-string-regexp');
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/create-react-app/index.js:39:13)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

Reproducible Demo

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions