ng run start:en命令抛出异常。
Project 'start' could not be found in workspace.
Error: Project 'start' could not be found in workspace.
at Workspace.getProject (...node_modules\@angular-devkit\core\src\workspace\workspace.js:93:19)
at Architect.getBuilderConfiguration (node_modules\@angular-devkit\architect\src\architect-legacy.js:117:41)
at RunCommand.runSingleTarget (\node_modules\@angular\cli\models\architect-command.js:160:45)
at RunCommand.runArchitectTarget (node_modules\@angular\cli\models\architect-command.js:201:35)
at RunCommand.run node_modules\@angular\cli\commands\run-impl.js:14:25)
at RunCommand.validateAndRun (node_modules\@angular\cli\models\command.js:124:31)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.
Module.runMain (internal/modules/cjs/loader.js:745:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
package.json
"scripts": {
"ng": "ng",
"start": "ng serve",
"start:ur": "ng serve --configuration=ed",
"start:en": "ng serve --configuration=en",
"build": "ng build",
"build:ur": "ng build --configuration=ed",
"build:en": "ng build --configuration=en",
...
}
我已经尝试过所有从Google Stack溢出中获得的解决方案
node_module
文件夹package-lock.json
答案 0 :(得分:1)
要运行package.json
中的命令,您需要使用npm run
来调用它们。 npm
将调用package.json
内部的脚本。
因此,对于在start:en
中运行package.json
脚本的问题,您将需要运行
npm run start:en