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

Module parse failed: Identifier directly after number #58

Closed
arcataroger opened this issue Jul 11, 2022 · 2 comments
Closed

Module parse failed: Identifier directly after number #58

arcataroger opened this issue Jul 11, 2022 · 2 comments

Comments

@arcataroger
Copy link

Trying to run 8.0.0 an on older Babel/react-scripts version, and running into this issue:

./node_modules/pretty-ms/index.js 5:37
Module parse failed: Identifier directly after number (5:37)
File was processed with these loaders:
 * ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| const pluralize = (word, count) => count === 1 ? word : `${word}s`;
| 
> const SECOND_ROUNDING_EPSILON = 0.000_000_1;
| export default function prettyMilliseconds(milliseconds) {
|   let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

Downgrading to pretty-ms 7.0.1 fixes it for now

Dependencies:

"@babel/core": "7.8.4",
    "babel-loader": "^8.0.6",
 "@craco/craco": "^6.4.3",
    "react": "16.12.0",

@sindresorhus
Copy link
Owner

The tooling or Node.js version you use does not support a certain JavaScript feature. This is not a problem with this package.

@sindresorhus sindresorhus closed this as not planned Won't fix, can't repro, duplicate, stale Jul 12, 2022
@amitava82
Copy link

Same error with react-native

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

No branches or pull requests

3 participants