且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

NPM start 返回错误,“项目依赖树可能有问题";

更新时间:2022-12-17 11:40:41

在终端中,运行:

cd ~

那么:

ls

您应该会看到一个文件列表.如果 node_modules 包含在该列表中(看起来应该是这样),您希望删除该文件夹.您可以在终端中这样做:

You should see a list of files. If node_modules is included in that list (as it appears it should be), you want to delete that folder. You can do so in the terminal like so:

rm -rf node_modules

但请记住:这不会将文件夹发送到垃圾箱.它将不可撤销地删除它.rm -rf 是一个强大的命令.如果这让您感到紧张,请输入 open . 代替.这将在 Finder 中打开您的主"(~) 目录,您可以在那里以熟悉的、右键单击、发送到垃圾箱的方式删除 node_modules.

But keep in mind: this will not send the folder to the trash. It will irrevocably delete it. rm -rf is a powerful command. If that makes you nervous, type open . instead. That will open your "home" (~) directory in Finder, and you can delete node_modules in the familiar, right-click, send-to-trash way there.

希望有帮助!