Closed nchangnon closed 3 years ago
Hi, sorry for asking, is this issue solved already? I'm having the same problem.
I'm getting this with 11.0,5 - what's the workaround ? I removed the "resolution" but still am getting the error
Hi, sorry for asking, is this issue solved already? I'm having the same problem.
It should have been solved in 11.1.0-next-2/0.1101.0-next.2. If you try that version(change both @angular/cli and @angular-devkit/build-angular dependencies) you won't have that issue anymore. However, in my case another issue came out after changing those dependencies:
β Generating browser application bundles (phase: building)...(node:5678) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET] DeprecationWarning: Compilation.modules was changed from Array to Set (using Array method 'find' is deprecated)
/home/t3o/devel/module-federation-test/node_modules/webpack/lib/Dependency.js:216
throw new Error(
^
Error: module property was removed from Dependency (use compilation.moduleGraph.getModule(dependency) instead)
at JsonExportsDependency.get (/home/t3o/devel/module-federation-test/node_modules/webpack/lib/Dependency.js:216:9)
at iteratorDependency (/home/t3o/devel/module-federation-test/node_modules/webpack/lib/Compilation.js:2640:11)
at Compilation.removeReasonsOfDependencyBlock (/home/t3o/devel/module-federation-test/node_modules/webpack/lib/Compilation.js:2657:42)
at /home/t3o/devel/module-federation-test/node_modules/webpack/lib/Compilation.js:1828:10
at /home/t3o/devel/module-federation-test/node_modules/webpack/lib/util/AsyncQueue.js:104:29
at processTicksAndRejections (internal/process/task_queues.js:79:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
So, for now I'm using a locally modified 11.0.5 with the fix suggested by @nchangnon in the original post of this thread and it works fine.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
π Bug report
Command (mark with an
x
)Is this a regression?
Yes, the previous version in which this bug was not present was: .... This works when not opting-in to Webpack 5. ### Description A clear and concise description of the problem... If scripts are specified in the build options to be included globally, `ng serve` fails to run. `ng build` succeeds and is able to be deployed as usual. ## π¬ Minimal Reproduction"resolutions": { "webpack": "5.4.0" }
add an external dependency such as jquery to package.json (using yarn)
yarn add jquery
update angular.json to include the new global dependency
run ng serve
π₯ Exception or Error
π Your Environment
Anything else relevant?
It works if ScriptsWebpackPlugin.shouldSkip is updated to include compilation.fileTimestamps check first