question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:15

github_iconTop GitHub Comments

2reactions
connoradscommented, Oct 6, 2019

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

1reaction
giuseppegcommented, Oct 6, 2019

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found