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.

Error: potentially unsafe regular expression: ^(?:(?!(?:[\[!*+?$^"'.\\/]+)).)+

See original GitHub issue

🐛

Got error trying to run the documentation hello world example.

🎛 Configuration (package.json)

Initial package.json without any additional dependency

🤔 Expected Behavior

A parcel server started as is described on the getting started page

😯 Current Behavior

Error after run parcel index.html

(node:2452) UnhandledPromiseRejectionWarning: Error: potentially unsafe regular expression: ^(?😦?!(?:[[!*+?$^"'.\/]+)).)+ at Function.toRegex.create (/home/lala/.nvm/versions/node/v9.3.0/lib/node_modules/parcel-bundler/node_modules/regex-not/index.js:62:11) at createTextRegex (/home/lala/.nvm/versions/node/v9.3.0/lib/node_modules/parcel-bundler/node_modules/nanomatch/lib/parsers.js:378:22) at Object.<anonymous> (/home/lala/.nvm/versions/node/v9.3.0/lib/node_modules/parcel-bundler/node_modules/nanomatch/lib/parsers.js:14:11) at Module._compile (/home/lala/.nvm/versions/node/v9.3.0/lib/node_modules/parcel-bundler/node_modules/v8-compile-cache/v8-compile-cache.js:178:30) at Object.Module._extensions…js (module.js:671:10) at Module.load (module.js:573:32) at tryModuleLoad (module.js:513:12) at Function.Module._load (module.js:505:3) at Module.require (module.js:604:17) at require (/home/lala/.nvm/versions/node/v9.3.0/lib/node_modules/parcel-bundler/node_modules/v8-compile-cache/v8-compile-cache.js:159:20) (node:2452) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:2452) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

🔦 Context

I was trying to run the getting started example.

💻 Code Sample

🌍 Your Environment

Software Version(s)
Parcel 1.6.2
Node v9.3.0
npm/Yarn 5.5.1
Operating System Ubuntu on Windows

Please, let me know if I can help with any other detail. I didn’t add the code since it’s the same that the getting started page.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
jlippscommented, Feb 20, 2018

i.e., rm -rf node_modules && npm install and you should be good to go

3reactions
jlippscommented, Feb 20, 2018

Should be fixed by https://github.com/jonschlinkert/regex-not/commit/335ef057744980b211a048f6b287b4690a9bc29f, if it’s the same thing I ran into

looks like this dep published a breaking change as as patch version.

it’s been fixed now though, looks like.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: potentially unsafe regular expression · Issue #156
It would appear the regex-not is somewhere in your dependency chain and they just released an update to check for whether or not...
Read more >
angular "potentially unsafe regular expression" - Stack Overflow
I cannot find any reference to this error anywhere. I'm new to Angular, can anyone assist with this error please? The full error...
Read more >
Regular expression Denial of Service - ReDoS
The Regular expression Denial of Service (ReDoS) is a Denial of Service attack, that exploits the fact that most Regular Expression implementations may ......
Read more >
Bug descriptions — spotbugs 4.7.3 documentation
This document lists the standard bug patterns reported by SpotBugs. Bad practice (BAD_PRACTICE)¶. Violations of recommended and essential coding practice.
Read more >
Catastrophic backtracking - The Modern JavaScript Tutorial
The problem described in this article is called “catastrophic backtracking”. We covered two ways how to solve it: Rewrite the regexp to lower ......
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