Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Externals schematics references non existend files (*.umd.js) #394

Open
MickL opened this issue Jun 26, 2023 · 1 comment
Open

Externals schematics references non existend files (*.umd.js) #394

MickL opened this issue Jun 26, 2023 · 1 comment

Comments

@MickL
Copy link

MickL commented Jun 26, 2023

I am on Angular 16 and ng g ngx-build-plus:externals references files like node_modules/@angular/core/bundles/core.umd.js that do not exists anymore.

Error: Can't resolve 'node_modules/@angular/common/bundles/common-http.umd.js' in '/Users/mick/Documents/git/myproject'

Error: Can't resolve 'node_modules/@angular/common/bundles/common.umd.js' in '/Users/mick/Documents/git/myproject'

Error: Can't resolve 'node_modules/@angular/compiler/bundles/compiler.umd.js' in '/Users/mick/Documents/git/myproject'

Error: Can't resolve 'node_modules/@angular/core/bundles/core.umd.js' in '/Users/mick/Documents/git/myproject'

Error: Can't resolve 'node_modules/@angular/elements/bundles/elements.umd.js' in '/Users/mick/Documents/git/myproject'

Error: Can't resolve 'node_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js' in '/Users/mick/Documents/git/myproject'

Error: Can't resolve 'node_modules/@angular/platform-browser/bundles/platform-browser.umd.js' in '/Users/mick/Documents/git/myproject'

I tried to figure out the correct import but couldnt make it work yet. Does anyone have an idea?

The follow I tried but I get Cannot use import statement outside a module:

"scripts": [
              "node_modules/rxjs/dist/esm/rxjs.umd.js",
              "node_modules/@angular/core/fesm2022/core.mjs",
              "node_modules/@angular/common/fesm2022/common.mjs",
              "node_modules/@angular/common/fesm2022/http.mjs",
              "node_modules/@angular/compiler/fesm2022/compiler.mjs",
              "node_modules/@angular/elements/fesm2022/elements.mjs",
              "node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs",
              "node_modules/@angular/platform-browser-dynamic/fesm2022/platform-browser-dynamic.mjs"
            ]
@MickL
Copy link
Author

MickL commented Jun 27, 2023

Found this issue where in the comments there seem to be a solution: #314

In any case the Schematic is broken so either the Schematic needs to be removed or maybe we can find a different way of bundling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant