./src/main/webapp/app/app-routing.module.ts 14:40
Module parse failed: Unexpected token (14:40)
File was processed with these loaders:
* ./node_modules/angular2-template-loader/index.js
* ./node_modules/cache-loader/dist/cjs.js
* ./node_modules/thread-loader/dist/cjs.js
* ./node_modules/ts-loader/index.js
* ./node_modules/angular-router-loader/src/index.js
* ./node_modules/tslint-loader/index.js
You may need an additional loader to handle the result of these loaders.
| {
| path: 'admin',
> loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule),
| },
| ...errorRoute,
tsconfig.json
{
"compilerOptions": {
"target": "es2017",
"module": "esnext",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false,
"skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true,
"outDir": "target/classes/static/app",
"lib": ["es7", "dom"],
"typeRoots": ["node_modules/@types"],
"baseUrl": "./",
"paths": {
"app/*": ["src/main/webapp/app/*"]
},
"importHelpers": true,
"allowJs": true
},
"include": ["src/main/webapp/app", "src/test/javascript/"],
"exclude": ["node_modules"]
}
app-routing.module.ts
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { errorRoute } from './layouts';
import { DEBUG_INFO_ENABLED } from 'app/app.constants';
@NgModule({
imports: [
RouterModule.forRoot(
[
{
path: 'admin',
loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule),
},
...errorRoute,
],
{ enableTracing: DEBUG_INFO_ENABLED }
),
],
exports: [RouterModule],
})
export class AppRoutingModule {}
yes, that was known issue during migration. Please check https://github.com/jhipster/generator-jhipster/pull/9825#issuecomment-497842385 for more details.
@vishal423 you tried to force the acorn version ?
I didn't work on this but I can try to check this out this week...
@wmarques, I haven't tried newly reported workarounds. At moment, I am bit occupied with protractor issues in the vuejs repository. If you have bandwidth, then, please try out.
Adding a bounty here as this is an important bug
@vishal423 ok perfect, I'll check it then
I've updated my project from 6.1.2 to 6.2.0 using the upgrade sub-generator and it wasn't working.
For those who have the same issue : I had to delete the node_modules folder AND package-json.lock file to force the right version of acon to be installed