Угловой 7 Run ng serve -o -c env - PullRequest
       66

Угловой 7 Run ng serve -o -c env

0 голосов
/ 25 октября 2018

Некоторое время назад я работал с angular 6 и тестировал разные среды, используя ng serve -o -c env_i_wanted.

Я добавил нужные конфигурации в конфигурации в файле angular.json.

В angular 7Я попробовал то же самое, но получил что-то вроде этого:

Project 'stage' could not be found in workspace.
Error: Project 'stage' could not be found in workspace.
    at Workspace.getProject (/Users/zjarr/Documents/Oktara/Websites/GoSweatHome/node_modules/@angular/cli/node_modules/@angular-devkit/core/src/workspace/workspace.js:93:19)
    at Architect.getBuilderConfiguration (/Users/zjarr/Documents/Oktara/Websites/GoSweatHome/node_modules/@angular/cli/node_modules/@angular-devkit/architect/src/architect.js:96:41)
    at ServeCommand.initialize (/Users/zjarr/Documents/Oktara/Websites/GoSweatHome/node_modules/@angular/cli/models/architect-command.js:81:52)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
    at Function.Module.runMain (module.js:696:11)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3

stage - среда, которую я хочу использовать

1 Ответ

0 голосов
/ 25 октября 2018

Выяснилось, что теперь требуется название проекта: https://angular.io/cli/serve

Например: ng s project_name -o --c stage

...