isaacs / rimraf

A `rm -rf` util for nodejs
ISC License
5.66k stars 252 forks source link

fillNegs() Error #265

Closed xiaoMingLong closed 1 year ago

xiaoMingLong commented 1 year ago

node version 12.22.12

D:\Github\vue-openlayer-api-main>rimraf node_modules C:\Users\Administrator\AppData\Roaming\npm\node_modules\rimraf\node_modules\minimatch\dist\cjs\ast.js:86

fillNegs() {

         ^

SyntaxError: Unexpected token '('  at wrapSafe (internal/modules/cjs/loader.js:915:16)  at Module._compile (internal/modules/cjs/loader.js:963:27)  at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)  at Module.load (internal/modules/cjs/loader.js:863:32)  at Function.Module._load (internal/modules/cjs/loader.js:708:14)  at Module.require (internal/modules/cjs/loader.js:887:19)  at require (internal/modules/cjs/helpers.js:74:18) at Object. (C:\Users\Administrator\AppData\Roaming\npm\node_modules\rimraf\node_modules\minimatch\dist\cjs\index.js:9:18)  at Module._compile (internal/modules/cjs/loader.js:999:30)  at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)

image

isaacs commented 1 year ago

That node version is not supported. As specified in the package.json, node 14 or higher is required. Upgrade node, or downgrade rimraf.

intelligentCoding commented 1 year ago

I am have the same issue although i am using Node: 18

isaacs commented 1 year ago

I am have the same issue although i am using Node: 18

Then it's not the same issue, because the issue here is failing to support private field syntax, and node 18 does support it. So either you have a different issue, or you aren't using the node version you think you are.

Please post a new issue with as much context as you can provide.

abinhho commented 1 year ago

I am have the same issue although i am using Node: 18

Then it's not the same issue

My case: It was not related to node version. Updated firebase CLI resolved the issue. Maybe someone using a cli (whatever services) then try to upgrade it.

ukhanzada-nisum-com commented 1 year ago

Has anyone solved this.. I am facing the same issue with Node 14.

isaacs commented 1 year ago

@abinhho Does fire base run code remotely on google's servers? Isn't that the whole point of it? So if YOUR machine is using node 18, it doesn't much matter, if THEIR machines aren't.

The best approach is to console.log(process.version) in the actual process that's crashing, and verify the output along with the error message from the crash, so you can verify that it's actually running on the node you think it is.

isaacs commented 1 year ago

@ukhanzada-nisum-com as mentioned previously, if you are using a supported node version then what you have is not "the same" issue, because "the issue" here is that the version of node used didn't support private field syntax.

So either you have a different issue, or you're not using the node version you think you are. Please verify your node version by logging it in the program that is crashing, like, the same exact code path. If it IS indeed a supported version, then your error message will be different. (I suppose you could have node 14 spawn a node 12 process that somehow encounters this code, but that seems less likely.)

If it's a different problem, post a new issue. If it's the same problem, upgrade node. If you think it's the same problem on a different version of node that doesn't have this problem, idk what to tell you, that's just incorrect.

q2333gh commented 1 year ago

That node version is not supported. As specified in the package.json, node 14 or higher is required. Upgrade node, or downgrade rimraf.

I was like an ape in the Space Odyssey . thank you ! it help a lot !