首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >npm启动服务器错误

npm启动服务器错误
EN

Stack Overflow用户
提问于 2018-10-17 21:58:02
回答 2查看 54关注 0票数 0

我正在尝试启动我的npm服务器(是的,我已经删除了nodes_module文件夹和package-lock.json文件),npm安装在同一位置多次。我也尝试过ng update @angular/cli

任何帮助都将不胜感激。

我现在收到以下错误

代码语言:javascript
运行
复制
Local workspace file ('angular.json') could not be found.
Error: Local workspace file ('angular.json') could not be found.
    at WorkspaceLoader._getProjectWorkspaceFilePath (C:\Users\Shawn Rahmani\Documents\GitHub\Community-Solar-Enrollment-Flow\node_modules\@angular\cli\models\workspace-loader.js:44:19)
    at WorkspaceLoader.loadWorkspace (C:\Users\Shawn Rahmani\Documents\GitHub\Community-Solar-Enrollment-Flow\node_modules\@angular\cli\models\workspace-loader.js:31:21)
    at BuildCommand._loadWorkspaceAndArchitect (C:\Users\Shawn Rahmani\Documents\GitHub\Community-Solar-Enrollment-Flow\node_modules\@angular\cli\models\architect-command.js:201:32)
    at BuildCommand.<anonymous> (C:\Users\Shawn Rahmani\Documents\GitHub\Community-Solar-Enrollment-Flow\node_modules\@angular\cli\models\architect-command.js:53:25)
    at Generator.next (<anonymous>)
    at C:\Users\Shawn Rahmani\Documents\GitHub\Community-Solar-Enrollment-Flow\node_modules\@angular\cli\models\architect-command.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (C:\Users\Shawn Rahmani\Documents\GitHub\Community-Solar-Enrollment-Flow\node_modules\@angular\cli\models\architect-command.js:3:12)
    at BuildCommand.initialize (C:\Users\Shawn Rahmani\Documents\GitHub\Community-Solar-Enrollment-Flow\node_modules\@angular\cli\models\architect-command.js:52:16)
    at Object.<anonymous> (C:\Users\Shawn Rahmani\Documents\GitHub\Community-Solar-Enrollment-Flow\node_modules\@angular\cli\models\command-runner.js:127:23)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
EN

Stack Overflow用户

发布于 2018-10-18 02:45:13

听起来像是你不在同一个目录中,或者你最近升级了节点。

您可以使用ng update来代替npm upgrade

有关更多信息,请查看此处

https://github.com/angular/angular-cli/wiki/update

您还应该检查是否有angular-cli.json文件,对于较新的版本,该文件已重命名为angular.json

票数 0
EN
查看全部 2 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52856697

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档