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

RC.3: Support for the experimental syntax 'dynamicImport' isn't currently enabled #33954

Closed
spock123 opened this issue Nov 21, 2019 · 4 comments

Comments

@spock123
Copy link

spock123 commented Nov 21, 2019

🐞 bug report

Upgrading my Angular 8.2 project to 9 RC.3 with Ivy, gives following errors for my lazy loaded modules:

SyntaxError: /home/lrj/project/ivy/src/app/app.routing.module.ts: Support for the experimental syntax 'dynamicImport' isn't currently enabled (15:29):

path: 'webcams',
  14 |         outlet: 'dialog',
> 15 |         loadChildren: () => import('./feature-modules/webcams/webcams.module').then(m => m.WebcamsModule)
     |                             ^
  16 |     },

Add @babel/plugin-syntax-dynamic-import (https://git.io/vb4Sv) to the 'plugins' section of your Babel config to enable parsing.


Is this a regression?

I think so, did not have this issue with RC.2

Disabling IVY makes everything work as expected.

🌍 Your Environment

Angular Version:





Angular CLI: 9.0.0-rc.3
Node: 12.2.0
OS: linux x64
Angular: 9.0.0-rc.3
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router, service-worker

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.900.0-rc.3
@angular-devkit/build-angular      0.900.0-rc.3
@angular-devkit/build-optimizer    0.900.0-rc.3
@angular-devkit/build-webpack      0.900.0-rc.3
@angular-devkit/core               8.3.19
@angular-devkit/schematics         8.3.19
@angular/cdk                       8.2.3
@angular/material                  8.2.3
@angular/material-moment-adapter   8.2.3
@ngtools/webpack                   9.0.0-rc.3
@schematics/angular                9.0.0-rc.3 (cli-only)
@schematics/update                 0.900.0-rc.3
rxjs                               6.5.3
typescript                         3.6.4
webpack                            4.41.2


Anything else relevant?

ts.config:

{
  "compileOnSave": false,
  "angularCompilerOptions": {
    "enableIvy": true
  },
  "compilerOptions": {
    "baseUrl": "./src",
    "importHelpers": true,
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "module": "esNext",
    "moduleResolution": "node",
    "noImplicitAny": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es2015",
    "skipLibCheck": true,
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2018",
      "dom"
    ],
    "paths": {
      "@store/*": ["app/store/*", "app/store"],
      "@store": ["app/store/*", "app/store"],
      "@modules/*": ["app/modules/*", "app/modules"],
      "@modules": ["app/modules/*", "app/modules"],
      "@main/*": ["app/main/*", "app/main"],
      "@models/*": ["app/models/*", "app/models"],
      "@models": ["app/models/*", "app/models"],
      "@main": ["app/main/*", "app/main"],
      "@environment": ["environments/environment"],
      "@lib/*": ["app/lib/*", "app/lib"],
      "@lib": ["app/lib/*", "app/lib"],
      "@iticket-business/*": [ "app/modules/iticket-business/*", "app/modules/iticket-business"]
    }
  }
}

@khalilou88
Copy link

I have the same error but only with i18n. otherwise the app work without errors.

@spock123
Copy link
Author

@khalilou88 I'm also using i18n.. maybe there's something there?

@alan-agius4
Copy link
Contributor

Duplicate of angular/angular-cli#16248

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants