jhipster / jhipster-vuejs

A Vue.js blueprint for JHipster. It will use Vue.js as the frontend library!
https://www.jhipster.tech
Apache License 2.0
301 stars 179 forks source link

acorn and lazy loading Errors during `npm run webpack:build` #598

Closed geyuqiu closed 4 years ago

geyuqiu commented 4 years ago
Overview of the issue

cannot find module 'acorn'


cannot find loader on line 10 in router/index.ts: const Home = () => import('../core/home/home.vue');

Motivation for or Use Case
Reproduce the error

jhipster --blueprint vuejs mvn

Related issues
Suggest a Fix

What made the problems disappear:

npm i --save-dev acorn

change lazy loading to normal loading:

import Home from '../core/home/home.vue';
import Error from '../core/error/error.vue';
import JhiConfigurationComponent from '../admin/configuration/configuration.vue';
import JhiDocsComponent from '../admin/docs/docs.vue';
import JhiHealthComponent from '../admin/health/health.vue';
import JhiLogsComponent from '../admin/logs/logs.vue';
import JhiAuditsComponent from '../admin/audits/audits.vue';
import JhiMetricsComponent from '../admin/metrics/metrics.vue';
import JhiTrackerComponent from '../admin/tracker/tracker.vue';
JHipster Version(s)

6.8.0

JHipster configuration

.yo-rc.json

{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "***"
    },
    "jhipsterVersion": "6.8.0",
    "applicationType": "monolith",
    "baseName": "***",
    "packageName": "***",
    "packageFolder": "***",
    "serverPort": "8080",
    "authenticationType": "oauth2",
    "cacheProvider": "ehcache",
    "enableHibernateCache": true,
    "websocket": "spring-websocket",
    "databaseType": "sql",
    "devDatabaseType": "h2Memory",
    "prodDatabaseType": "postgresql",
    "messageBroker": "kafka",
    "serviceDiscoveryType": false,
    "buildTool": "maven",
    "enableSwaggerCodegen": true,
    "jwtSecretKey": "***",
    "embeddableLaunchScript": false,
    "useSass": true,
    "clientPackageManager": "npm",
    "clientFramework": "VueJS", // has no effect?
    "clientTheme": "none",
    "clientThemeVariant": "",
    "creationTimestamp": 1586208446028,
    "testFrameworks": ["gatling", "cucumber", "protractor"],
    "jhiPrefix": "jhi",
    "entitySuffix": "",
    "dtoSuffix": "DTO",
    "otherModules": [
      {
        "name": "generator-jhipster-vuejs",
        "version": "1.7.0"
      }
    ],
    "enableTranslation": false,
    "blueprints": [
      {
        "name": "generator-jhipster-vuejs",
        "version": "1.7.0"
      }
    ],
    "searchEngine": false
  }
}
Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System
atomfrede commented 4 years ago

I was not able to reproduce it with the current master branch.

qmonmert commented 4 years ago

@geyuqiu same as @atomfrede I don't reproduce

qmonmert commented 4 years ago

@pascalgrimaud & @atomfrede I think you can close this ticket