"Syntax Error: Bad character escape sequence" on windows while `npm run dev` for `/u` path pages
See original GitHub issueHow to reproduce:
- On Windows 10
- Clone this repo: styled-jsx-u-debug
npm run dev
if change this line:
color: ${FONT_COLOR};
to
color: blue;
the error is gone.
GUESS:
It looks like a problem with the babel plugin, which get paths on windows like C:\project\pages\user.js
, and the \u
in the path cause character escaping.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:15
Top Results From Across the Web
Bad character escape sequence" on windows while `npm run ...
It looks like a problem with the babel plugin, which get paths on windows like C:\project\pages\user.js , and the \u in the path...
Read more >Bad character escape sequence" on windows while `npm run ...
"Syntax Error: Bad character escape sequence" on windows while `npm run dev` for `/u` path pages.
Read more >ES6: Bad character escape sequence creating ASCII string
What am I doing wrong? A unicode escape sequence is basically atomic. You cannot really build one dynamically.
Read more >SyntaxError: illegal character - JavaScript - MDN Web Docs
The JavaScript exception "illegal character" occurs when there is an invalid or unexpected token that doesn't belong at this position in the ...
Read more >API - esbuild
Minification means you are asking for smaller output, and the escape sequence \n takes two bytes while the newline character takes one byte....
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
Update: I think we can close this issue.
I found a commit with
package-lock.json
in there and reproduced the issue.When running
npm install
without apackage-lock.json
a newpackage-lock.json
is created and the issue is no longer there. So I think it is an issue in thenpm
dependency tree that has since been fixed.Thank you a lot for taking a look at this @connorads!!