isaacs/rimraf

Unexpected token '.'

ginalster opened this issue · 1 comments

This is new to me. Other projects still work but I am afraid to rebuild.

me@XPS-15-9510:~/git/myproject$ npm run start:dev

my-backend@1.0.0 start:dev /home/me/git/myproject
nest start --watch

/home/me/git/myproject/node_modules/@nestjs/cli/node_modules/rimraf/dist/cjs/src/ignore-enoent.js:15
if (er?.code !== 'ENOENT') {
^
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. (/home/me/git/myproject/node_modules/@nestjs/cli/node_modules/rimraf/dist/cjs/src/rimraf-posix.js:14:28)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-backend@1.0.0 start:dev: nest start --watch

node: v12.22.10
npm: 6.14.11

"rimraf": "^3.0.2",

I have wiped the dist and node_modules folders.

build run fine, --watch appears it might be the cause.

I know my node and such are old but it works on other machines.

All updates have been run on my machine, ubuntu 20x

Gina

isaacs commented

Node 12 is not supported by this library. It requires node 14 at least, but really, you should upgrade to a node version under LTS support, so v18 at this time.