gpt4 book ai didi

node.js - git-bash 上的全局命令 $ live-server 找不到?

转载 作者:太空宇宙 更新时间:2023-11-03 22:19:43 25 4
gpt4 key购买 nike

当我尝试全局运行 $ live-server 时,出现以下错误:

C:\Users\name\AppData\Roaming\npm/node_modules/node/bin/node: line 1: This: command not found

我认为由于某种原因它一定是在错误的地方查找。返回结果如下:

$ npm bin -g

C:\Users\name\AppData\Roaming\npm

有人知道为什么吗?

最佳答案

接下来是 node/issue 29287它指向 same recommendation :

I deleted my C:/Users/{username}/AppData/Roaming/npm and C:/Users/{username}/AppData/Roaming/npm-cache and reinstalled global npm modules, and the problem ceased.

It would be much better though if these steps could be avoided after upgrading/downgrading node.
If not, then at least, make it explicit in the docs that this step may be necessary when upgrading/downgrading existing node installations.

关于node.js - git-bash 上的全局命令 $ live-server 找不到?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59418329/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com