Syntax error: Octal literal in strict mode (9:50)
See original GitHub issueHello,
I really liked the demonstration of the module so I thought why not try it. After installing the module globally, I’ve created the app, navigated to the folder, ran npm start
and this is what it printed.
I haven’t touched anything.
> react-static start
=> Copying public directory...
=> [✓] Public directory copied: 5.597ms
=> Building Routes...
More than one route is defined for path: /
More than one route is defined for path: /
=> [✓] Routes Built: 153.290ms
=> Building App Bundle...
=> [✓] App serving at http://localhost:3000
Failed to rebuild.
./dist/react-static-routes.js
Syntax error: Octal literal in strict mode (9:50)
7 | import src_containers_Post from '..\src\containers\Post'
8 | import src_containers_Blog from '..\src\containers\Blog'
> 9 | import src_containers____ from '..\src\containers\404'
| ^
10 | const templateMap = {
11 | t_0: src_containers_Home,
12 | t_1: src_containers_About,
Also, there are lots of Babel
module warnings that something is deprecated. Something for ES7.
react-static v4.3.0
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
SyntaxError: "0"-prefixed octal literals and octal escape seq ...
Octal literals and octal escape sequences are deprecated and will throw a SyntaxError in strict mode. The standardized syntax uses a leading ...
Read more >Why are Octal numeric literals not allowed in strict mode (and ...
Octal literals are not allowed because disallowing them discourages programmers from using leading zeros as padding in a script.
Read more >Error transforming with 'commonjs' plugin: Octal literal in strict ...
Hi I get this error. SyntaxError: Error transforming .../node_modules/jspm/lib/ui.js with 'commonjs' plugin: Octal literal in strict mode (467:28) in .
Read more >JavaScript SyntaxError - "0"-prefixed octal literals and octal ...
Cause of Error: Octal literals and octal escape sequences are deprecated and a SyntaxError will be thrown by them in strict mode. The...
Read more >"0"-prefixed octal literals and octal escape seq. are deprecated
Octal literals and octal escape sequences are deprecated and will throw a SyntaxError in strict mode. With ECMAScript 2015 and later, the standardized...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have the same problem on Windows. Even on Windows the import paths should have forward slashes:
RIGHT:
WRONG:
Now, when arriving at
\404
node thinks\4
is an Octal. I have made PR #191 to fix the issue.I have face the same problem in my windows machine . It show the message below
`User@DESKTOP-B4M1POT MINGW64 /g/working/react/react-static $ yarn start yarn start v0.21.3 $ react-static start
=> Copying public directory… => [✓] Public directory copied: 8.141ms => Building Routes… => [✓] Routes Built: 682.275ms => Building App Bundle… => [✓] App serving at http://localhost:3000 Failed to rebuild. ./dist/react-static-routes.js Syntax error: G:/working/react/react-static/dist/react-static-routes.js: Octal l iteral in strict mode (9:50)
7 | import src_containers_Post from ‘…\src\containers\Post’ 8 | import src_containers_Blog from ‘…\src\containers\Blog’