balthisar / cncjs-pendant-gamepad

Use a Videogame Controller as a CNCjs Pendant
MIT License
11 stars 6 forks source link

Unexpected identifier with cpy-cli #8

Closed toxicfirefly closed 1 year ago

toxicfirefly commented 1 year ago

When I run npm install and got this error:

> cncjs-pendant-gamepad@2.0.0-dev.2 build-ts /home/pi/cncjs-pendant-gamepad
> tsc

> cncjs-pendant-gamepad@2.0.0-dev.2 copy-files /home/pi/cncjs-pendant-gamepad
> cpy 'src/*.json' lib

/home/pi/cncjs-pendant-gamepad/node_modules/cpy-cli/cli.js:2
import process from 'node:process';
       ^^^^^^^

SyntaxError: Unexpected identifier
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)

I did have a previous error but was resolved by running npm install -g typescript@4.8.4.

I have versions of Node and npm node@v10.24.1 npm@6.14.12

Now I am stuck with the above error, any help would be greatly appreciated.

toxicfirefly commented 1 year ago

Closing issue. Noticed in the package.json Node 12 or higher is needed.