nodejs / node-core-utils

CLI tools for Node.js Core collaborators
https://nodejs.github.io/node-core-utils/
MIT License
236 stars 107 forks source link

Occurs error when run git node #661

Closed luyahan closed 1 year ago

luyahan commented 1 year ago
luyahan@plct-dev-7:~/source/node $ node -v
v10.19.0
luyahan@plct-dev-7:~/source/node $ git node
/usr/local/lib/node_modules/node-core-utils/bin/git-node.js:3
import { readdirSync } from 'fs';
       ^

SyntaxError: Unexpected token {
    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)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
luyahan commented 1 year ago

Fix it by updating node to v18

aduh95 commented 1 year ago

Node.js v10.x is EOL since 2021-04-30, bugs and security issues are expected when using an EOL platform. Upgrading is the correct fix. Closing as Won't Fix.