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:
- Created 6 years ago
- Reactions:6
- Comments:9 (1 by maintainers)

Top Related StackOverflow Question
i.e.,
rm -rf node_modules && npm installand you should be good to goShould 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.