Adding a @nrwl/web app and serving it in a workpace with an angular 12 app fails
See original GitHub issueCurrent Behavior
If a workspace already has an angular 12 app - then adding a new @nrwl/web
app and serving it throws an error.
Interestingly, the order that the apps are added in seems to matter. creating a @nrwl/web
app first, and then adding @nrwl/angular
app later - doesnβt have this problem.
Downgrading to 12.3.5
seems to solve the issue
Expected Behavior
Serving a web app in the mentioned context would not error.
Steps to Reproduce
- repro repo.
- run
npx nx serve web-app
Failure Logs
% npx nx serve web-app
> nx run web-app:serve
Starting type checking service...
Using 10 workers with 2048MB memory limit
> NX Web Development Server is listening at http://localhost:4200/
/myorg-wp-c/node_modules/webpack/lib/Dependency.js:311
throw new Error(
^
Error: module property was removed from Dependency (use compilation.moduleGraph.updateModule(dependency, module) instead)
at ProvidedDependency.set (/myorg-wp-c/node_modules/webpack/lib/Dependency.js:311:9)
at iterationDependencies (/myorg-wp-c/node_modules/@nrwl/web/node_modules/webpack/lib/Compilation.js:940:21)
at /myorg-wp-c/node_modules/@nrwl/web/node_modules/webpack/lib/Compilation.js:950:8
at /myorg-wp-c/node_modules/@nrwl/web/node_modules/webpack/lib/NormalModuleFactory.js:409:6
at /myorg-wp-c/node_modules/@nrwl/web/node_modules/webpack/lib/NormalModuleFactory.js:155:13
at AsyncSeriesWaterfallHook.eval [as callAsync] (eval at create (/myorg-wp-c/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at /myorg-wp-c/node_modules/@nrwl/web/node_modules/webpack/lib/NormalModuleFactory.js:138:29
at /myorg-wp-c/node_modules/@nrwl/web/node_modules/webpack/lib/NormalModuleFactory.js:346:9
at processTicksAndRejections (internal/process/task_queues.js:75:11)
βββββββββββββββββββββββββββββββββββββββββββββββ
Environment
Node : 14.16.0
OS : darwin x64
npm : 6.14.11
nx : Not Found
@nrwl/angular : 12.3.6
@nrwl/cli : 12.3.6
@nrwl/cypress : 12.3.6
@nrwl/devkit : 12.3.6
@nrwl/eslint-plugin-nx : 12.3.6
@nrwl/express : Not Found
@nrwl/jest : 12.3.6
@nrwl/linter : 12.3.6
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 12.3.6
@nrwl/web : 12.3.6
@nrwl/workspace : 12.3.6
@nrwl/storybook : Not Found
@nrwl/gatsby : Not Found
typescript : 4.2.4
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Getting started with service workers - Angular
To set up the Angular service worker in your project, use the CLI command ng add @angular/pwa . It takes care of configuring...
Read more >Setting up the local environment and workspace - Angular
The Angular CLI includes a server, for you to build and serve your app locally. Navigate to the workspace folder, such as my-app...
Read more >Building and serving Angular apps
A project's src/environments/ folder contains the base configuration file, environment.ts , which provides a default environment. You can add override defaultsΒ ...
Read more >Launching your app with a root module - Angular
The service providers. bootstrap, The root component that Angular creates and inserts into the index.html host web page. The default application created byΒ ......
Read more >@nrwl/workspace - npm
By default, an Nx workspace starts blank. There are no applications to build, serve, and test. To create one, you need to add...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
+1οΌ I think itβs a webpack version issue, @angular-devkit/build-angular need webpack 5οΌ @nrwl/web need 4.
If set webpack to 4 in package.json,
@nrwl/web
app can workThese are used for hot module reloading in React. You made need to add
devServer.hot
= true in your config for it to work.