-
Notifications
You must be signed in to change notification settings - Fork 622
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
AOT=1 meteor
broken for Angular versions ≥ 13
#1988
Comments
By applying #1987, it becomes clear that the issue is that Meteor is unable to load the Error: Cannot find module '/Users/quatrava/Dev/angular-meteor-base/node_modules/@angular/compiler' |
The error is caused by some kind of ES Module mishap in version 13: $ rm node_modules; ln -s node_modules-v13 node_modules
$ meteor node -e 'require("@angular/compiler")'
internal/modules/cjs/loader.js:977
throw new ERR_REQUIRE_ESM(filename);
^
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/quatrava/Dev/angular-meteor-base/node_modules-v13/@angular/compiler/fesm2015/compiler.mjs
at new NodeError (internal/errors.js:322:7)
at Module.load (internal/modules/cjs/loader.js:977:11)
at Function.Module._load (internal/modules/cjs/loader.js:819:12)
at Module.require (internal/modules/cjs/loader.js:1003:19)
at require (internal/modules/cjs/helpers.js:107:18)
at [eval]:1:1
at Script.runInThisContext (vm.js:134:12)
at Object.runInThisContext (vm.js:310:38)
at internal/process/execution.js:81:19
at [eval]-wrapper:6:22 {
code: 'ERR_REQUIRE_ESM'
}
$ rm node_modules; ln -s node_modules-v12 node_modules
$ meteor node -e 'require("@angular/compiler")'
$ rm node_modules; ln -s node_modules-v13 node_modules
$ meteor node -e 'require("@angular/compiler")'
internal/modules/cjs/loader.js:977
throw new ERR_REQUIRE_ESM(filename);
^
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/quatrava/Dev/angular-meteor-base/node_modules-v13/@angular/compiler/fesm2015/compiler.mjs
at new NodeError (internal/errors.js:322:7)
at Module.load (internal/modules/cjs/loader.js:977:11)
at Function.Module._load (internal/modules/cjs/loader.js:819:12)
at Module.require (internal/modules/cjs/loader.js:1003:19)
at require (internal/modules/cjs/helpers.js:107:18)
at [eval]:1:1
at Script.runInThisContext (vm.js:134:12)
at Object.runInThisContext (vm.js:310:38)
at internal/process/execution.js:81:19
at [eval]-wrapper:6:22 {
code: 'ERR_REQUIRE_ESM'
}
$ rm node_modules; ln -s node_modules-v12 node_modules
$ meteor node -e 'require("@angular/compiler")'
$ |
I pinned this down to the fact that Angular v13's I'm having trouble digging down any further, precisely because the |
Steps to reproduce:
git clone [email protected]:domq/angular-meteor-base.git
cd angular-meteor-base; meteor npm i
env AOT=1 meteor
→ behavior OK, see belowgit checkout upgrade/angular-12 && env AOT=1 meteor
→ behavior OKgit checkout upgrade/angular-13 && env AOT=1 meteor
→ failure, see belowwhere
AOT=1
, the server starts up without complaining, and the browser's developer tools show that no HTML downloads occur.The text was updated successfully, but these errors were encountered: