我正在尝试启动我的npm服务器(是的,我已经删除了nodes_module文件夹和package-lock.json文件),npm安装在同一位置多次。我也尝试过ng update @angular/cli。
任何帮助都将不胜感激。
我现在收到以下错误
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发布于 2018-10-18 02:45:13
听起来像是你不在同一个目录中,或者你最近升级了节点。
您可以使用ng update来代替npm upgrade
有关更多信息,请查看此处
https://github.com/angular/angular-cli/wiki/update
您还应该检查是否有angular-cli.json文件,对于较新的版本,该文件已重命名为angular.json。
https://stackoverflow.com/questions/52856697
复制相似问题