styled-jsx: "Syntax Error: Bad character escape sequence" on windows while `npm run dev` for `/u` path pages

How to reproduce:

image

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

Most upvoted comments

Update: I think we can close this issue.

I found a commit with package-lock.json in there and reproduced the issue. image

When running npm install without a package-lock.json a new package-lock.json is created and the issue is no longer there. So I think it is an issue in the npm dependency tree that has since been fixed. image

Thank you a lot for taking a look at this @connorads!!