You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. install new angular project with ng new.
2. enter ng-new folder.
3. set yarn to 2.0 in folder according to: https://next.yarnpkg.com/getting-started/install
4, remove node_modules folder and any .lock files
4. run yarn install again.
5. run yarn start `( e.g. set to ng serve --host 0.0.0.0 --port 3605 --disable-host-check --public-host https://angular.syntapse.co.uk/ng-new/ in package.json)`
Result:
An unhandled exception occurred: Something that got detected as your top-level application (because it doesn't seem to belong to any package) tried to access a package that is not declared in your dependencies
Required package: @angular-devkit/architect (via "@angular-devkit/architect")
Required by: /app/angular/ng-new/node_modules/@angular-devkit/build-angular/src/dev-server/index.js
Require stack:
- /app/angular/ng-new/node_modules/@angular-devkit/build-angular/src/dev-server/index.js
- /app/angular/ng-new/.yarn/cache/@angular-devkit-architect-npm-0.803.20-b002c42256-1.zip/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js
- /app/angular/ng-new/.yarn/cache/@angular-devkit-architect-npm-0.803.20-b002c42256-1.zip/node_modules/@angular-devkit/architect/node/index.js
- /app/angular/ng-new/.yarn/unplugged/@angular-cli-npm-8.3.20-0750f884fd/node_modules/@angular/cli/models/architect-command.js
- /app/angular/ng-new/.yarn/unplugged/@angular-cli-npm-8.3.20-0750f884fd/node_modules/@angular/cli/commands/serve-impl.js
- /app/angular/ng-new/.yarn/cache/@angular-devkit-schematics-npm-8.3.20-71c0eb71a3-1.zip/node_modules/@angular-devkit/schematics/tools/export-ref.js
- /app/angular/ng-new/.yarn/cache/@angular-devkit-schematics-npm-8.3.20-71c0eb71a3-1.zip/node_modules/@angular-devkit/schematics/tools/index.js
- /app/angular/ng-new/.yarn/unplugged/@angular-cli-npm-8.3.20-0750f884fd/node_modules/@angular/cli/utilities/json-schema.js
- /app/angular/ng-new/.yarn/unplugged/@angular-cli-npm-8.3.20-0750f884fd/node_modules/@angular/cli/models/command-runner.js
- /app/angular/ng-new/.yarn/unplugged/@angular-cli-npm-8.3.20-0750f884fd/node_modules/@angular/cli/lib/cli/index.js
- /app/angular/ng-new/.yarn/unplugged/@angular-cli-npm-8.3.20-0750f884fd/node_modules/@angular/cli/lib/init.js
- /app/angular/ng-new/.yarn/unplugged/@angular-cli-npm-8.3.20-0750f884fd/node_modules/@angular/cli/bin/ng
See "/tmp/ng-EmIJni/angular-errors.log" for further details
What is the expected behavior?
yarn start should work without dependency issues on a project created with ng new which works ok with yarn v1 in normal mode.
Please mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered:
laurencefass
changed the title
ng new project: required package: @angular-devkit/architect (via "@angular-devkit/architect") not declared in dependencies
ng new project: yarn start error=required package: @angular-devkit/architect (via "@angular-devkit/architect") not declared in dependencies
Dec 11, 2019
[error] Error: Could not find module "@angular-devkit/build-angular" from "/app/angular/ng-new".
at Object.resolve (/app/angular/ng-new/.yarn/cache/@angular-devkit-core-npm-8.3.20-cc9c74017d-1.zip/node_modules/@angular-devkit/core/n$ at WorkspaceNodeModulesArchitectHost.resolveBuilder (/app/angular/ng-new/.yarn/cache/@angular-devkit-architect-npm-0.803.20-b002c42256-$ at ServeCommand.initialize (/app/angular/ng-new/.yarn/unplugged/@angular-cli-npm-8.3.20-0750f884fd/node_modules/@angular/cli/models/arc$ at process._tickCallback (internal/process/next_tick.js:43:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:763:11)
at startup (internal/bootstrap/node.js:308:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:878:3)
laurencefass
changed the title
ng new project: yarn start error=required package: @angular-devkit/architect (via "@angular-devkit/architect") not declared in dependencies
reinstalling "ng new" project: yarn start error=required package: @angular-devkit/architect (via "@angular-devkit/architect") not declared
Dec 11, 2019
Do you want to request a feature or report a bug?
critical bug
What is the current behavior?
Result:
What is the expected behavior?
yarn start should work without dependency issues on a project created with ng new which works ok with yarn v1 in normal mode.
Please mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered: