小编ste*_*evo的帖子

无法更新节点版本 - 意外令牌

最近为了技术评估将我的节点降级到版本 12,现在想要升级,但似乎出了问题。我尝试了很多大家都建议的事情。

不是一个非常熟练的 mac 用户,所以任何帮助表示赞赏

MacBook-Pro ~ % npm install -g n
ERROR: npm v9.1.2 is known not to run on Node.js v12.22.12. You'll need to
upgrade to a newer Node.js version in order to use this version of npm. This
version of npm supports the following node versions: `^14.17.0 || ^16.13.0 ||
>=18.0.0`. You can find the latest version at https://nodejs.org/.

ERROR:
/usr/local/lib/node_modules/npm/lib/utils/exit-handler.js:22
  const hasLoadedNpm = npm?.config.loaded
                           ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at …
Run Code Online (Sandbox Code Playgroud)

macos npm node-modules

8
推荐指数
1
解决办法
2万
查看次数

标签 统计

macos ×1

node-modules ×1

npm ×1