馃悰
Got error trying to run the documentation hello world example.
Initial package.json without any additional dependency
A parcel server started as is described on the getting started page
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.(/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.
I was trying to run the getting started example.
| 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.
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.
i.e., rm -rf node_modules && npm install
and you should be good to go
It happened to me today after VSCode update yesterday.
Created a new app using
ng new hello
while running
ng serve
I got
Error: potentially unsafe regular expression: ^(?:(?!(?:[[!*+?$^"'.\/]+)).)+
Node version:
NPM version: 5.6.0
TSC version : 2.7.1
Angular CLI: 1.7.0
This has been fixed (as noted by @jlipps in https://github.com/parcel-bundler/parcel/issues/858#issuecomment-366850507)
node_modules
_(You might also need to delete yarn.lock
and/or package-lock.json
to ensure that cached modules are not used.)_
I recommend adding "FIXED" to the issue title, and adding the following sentence to the OP: "EDIT: This has been fixed. Please read this comment for instructions.
My app worked by modifying regex-not\index.js file as described in
https://github.com/jonschlinkert/regex-not/commit/335ef057744980b211a048f6b287b4690a9bc29f
wow, I've just compiled a project with regex-not dependency just about the bad timing, and found this thread, thanks guy!
My app worked by modifying regex-not\index.js file as described in
@hgirish @eapostol There is already a fix, described in the comment before yours. Monkey-patching isn't a solution.
@betomoretti might I suggest that you update your title with "FIXED" and add a comment to the top of your OP as such?
same as @nabito . Literally coding a project with the regex-not dependency . Used @hgirish 's solution. talk about to the minute! thank you
Appears to be fixed gonna close this issue
Sent with GitHawk
Most helpful comment
i.e.,
rm -rf node_modules && npm install
and you should be good to go