styled-jsx: "Syntax Error: Bad character escape sequence" on windows while `npm run dev` for `/u` path pages
How 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.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 15
Update: I think we can close this issue.
I found a commit with
package-lock.jsonin there and reproduced the issue.When running
npm installwithout apackage-lock.jsona newpackage-lock.jsonis created and the issue is no longer there. So I think it is an issue in thenpmdependency tree that has since been fixed.Thank you a lot for taking a look at this @connorads!!