【发布时间】:2018-10-18 02:45:12
【问题描述】:
我正在尝试启动我的 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
【问题讨论】:
-
这个方法以前有效吗?您可以签出旧版本并查看它是否运行?
-
是的,它以前工作过 - 我可以试一试
-
@SRahmani 这可能会帮助你filipmolcik.com/…?
-
@SRahmani 只要确保 Angular cli 的全局版本和本地版本匹配
-
@JameelM 我可能应该澄清一下我只是想在本地运行 - 那有关系吗?
标签: node.js angular typescript npm