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

Example works but 'SyntaxError: Cannot use 'import.meta' outside a module.' error is still present. #3

Open
cnestor1 opened this issue Dec 15, 2021 · 1 comment

Comments

@cnestor1
Copy link

Thanks for a great API. We use @angular-architects/module-federation version 12 and web components without issue. However, migrating to Angular 13 MF is more painful.

I first tried with 14.0.0-beta.1 since 14.0.0-beta.5 doesn't work as stated by the previous issue.
"@angular-architects/module-federation": "14.0.0-beta.1", "@angular-architects/module-federation-tools": "14.0.0-beta.1", "@angular/animations": "13.0.2",

and got this error:
An unhandled exception occurred: Cannot find module 'ngx-build-plus/package.json'
Require stack:

then ran yarn add ngx-build-plus

The Shell finally started and both Micro frontends (mfe1/react) are present! However, I still see this error in the log:
styles.js:4534 Uncaught SyntaxError: Cannot use 'import.meta' outside a module

I then tried to use the latest release candidate:
yarn add @angular-architects/[email protected]
yarn add @angular-architects/[email protected]
selected: 14.0.0-beta.1.12

which results in the following package.json:
"dependencies": { "@angular-architects/module-federation": "14.0.0-rc.1", "@angular-architects/module-federation-tools": "14.0.0-rc.1", "@angular/animations": "13.0.2", ...

When I start the shell, I get the following error: Cannot find module 'ajv-formats'
If I try to install it I get the following error:
npm i ajv-formats npm ERR! code ETARGET npm ERR! notarget No matching version found for @angular-architects/[email protected]. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist.

I then deleted package-lock, node_modules and reran a yarn install, and this time it works, albeit with this error:
styles.js:4534 Uncaught SyntaxError: Cannot use 'import.meta' outside a module

@19kills
Copy link

19kills commented Apr 21, 2022

We are seeing same styles.js:4534 Uncaught SyntaxError: Cannot use 'import.meta' outside a module with Angular 13.1.1

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

2 participants