0

我的 jhipster-registry 几个小时前停止工作。

我按照以下步骤操作:

  1. 删除 node_modules/ 文件夹
  2. npm 安装
  3. ./mvnw

当注册表重新启动并运行时,我收到一个错误页面,其中包含以下文本:

??error.title_en??

在日志中找到:

2017-08-04 22:58:53.729 DEBUG 3203 --- [kground-preinit] org.jboss.logging                        : Logging Provider: org.jboss.logging.Slf4jLoggerProvider found via system property

        ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
        ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
        ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝
  ██╗   ██║ ██╔═══██║    ██║    ██╔════╝   ╚═══██╗    ██║    ██╔═══╝   ██╔══██║
  ╚██████╔╝ ██║   ██║ ████████╗ ██║       ██████╔╝    ██║    ████████╗ ██║  ╚██╗
   ╚═════╝  ╚═╝   ╚═╝ ╚═══════╝ ╚═╝       ╚═════╝     ╚═╝    ╚═══════╝ ╚═╝   ╚═╝

:: JHipster Registry :: Running Spring Boot 1.5.4.RELEASE ::
:: http://jhipster.github.io ::

2017-08-04 22:58:56.117  INFO 3203 --- [  restartedMain] i.g.j.registry.JHipsterRegistryApp       : The following profiles are active: dev,native
2017-08-04 22:58:59.313 DEBUG 3203 --- [  restartedMain] i.g.j.r.config.AsyncConfiguration        : Creating Async Task Executor
2017-08-04 22:58:59.994 DEBUG 3203 --- [  restartedMain] i.g.j.r.config.MetricsConfiguration      : Registering JVM gauges
2017-08-04 22:59:00.274 DEBUG 3203 --- [  restartedMain] i.g.j.r.config.MetricsConfiguration      : Initializing Metrics JMX reporting
2017-08-04 22:59:03.135 DEBUG 3203 --- [  restartedMain] i.g.j.registry.config.WebConfigurer      : Registering CORS filter
2017-08-04 22:59:03.327  WARN 3203 --- [  restartedMain] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2017-08-04 22:59:04.102  INFO 3203 --- [  restartedMain] i.g.j.registry.config.WebConfigurer      : Web application configuration, using profiles: dev
2017-08-04 22:59:04.103 DEBUG 3203 --- [  restartedMain] i.g.j.registry.config.WebConfigurer      : Initializing Metrics registries
2017-08-04 22:59:04.107 DEBUG 3203 --- [  restartedMain] i.g.j.registry.config.WebConfigurer      : Registering Metrics Filter
2017-08-04 22:59:04.107 DEBUG 3203 --- [  restartedMain] i.g.j.registry.config.WebConfigurer      : Registering Metrics Servlet
2017-08-04 22:59:04.113  INFO 3203 --- [  restartedMain] i.g.j.registry.config.WebConfigurer      : Web application fully configured
2017-08-04 22:59:12.109  WARN 3203 --- [  restartedMain] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2017-08-04 22:59:12.551  INFO 3203 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1
2017-08-04 22:59:12.551  INFO 3203 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Client configured to neither register nor query for data.
2017-08-04 22:59:12.571  INFO 3203 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1501880352571 with initial instances count: 0
2017-08-04 22:59:12.941  INFO 3203 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2017-08-04 22:59:12.941  INFO 3203 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2017-08-04 22:59:12.942  INFO 3203 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2017-08-04 22:59:12.942  INFO 3203 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2017-08-04 22:59:13.809  WARN 3203 --- [  restartedMain] o.s.j.e.a.AnnotationMBeanExporter        : Bean with key 'zuulEndpoint' has been registered as an MBean but has no exposed attributes or operations
2017-08-04 22:59:14.606 DEBUG 3203 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect        : Enter: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with argument[s] = []
2017-08-04 22:59:14.614 DEBUG 3203 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect        : Exit: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with result = null
2017-08-04 22:59:14.740  INFO 3203 --- [  restartedMain] i.g.j.registry.JHipsterRegistryApp       : Started JHipsterRegistryApp in 22.799 seconds (JVM running for 23.886)
2017-08-04 22:59:14.741  INFO 3203 --- [  restartedMain] i.g.j.registry.JHipsterRegistryApp       : 
----------------------------------------------------------
    Application 'jhipster-registry' is running! Access URLs:
    Local:      http://localhost:8761
    External:   http://xxx.xxx.x.xxx:8761
    Profile(s):     [dev, native]
----------------------------------------------------------
2017-08-04 22:59:19.615 DEBUG 3203 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect        : Enter: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with argument[s] = []
2017-08-04 22:59:19.616 DEBUG 3203 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect        : Exit: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with result = null
2017-08-04 22:59:24.621 DEBUG 3203 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect        : Enter: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with argument[s] = []
2017-08-04 22:59:24.622 DEBUG 3203 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect        : Exit: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with result = null
2017-08-04 22:59:27.234  WARN 3203 --- [  XNIO-2 task-1] o.s.c.n.zuul.web.ZuulHandlerMapping      : No routes found from RouteLocator
2017-08-04 22:59:27.438 DEBUG 3203 --- [  XNIO-2 task-1] freemarker.cache                         : Couldn't find template in cache for "error.ftl"("en", UTF-8, parsed); will try to load it.
2017-08-04 22:59:27.441 DEBUG 3203 --- [  XNIO-2 task-1] freemarker.cache                         : TemplateLoader.findTemplateSource("error_en.ftl"): Not found
2017-08-04 22:59:27.444 DEBUG 3203 --- [  XNIO-2 task-1] freemarker.cache                         : TemplateLoader.findTemplateSource("error.ftl"): Not found
2017-08-04 22:59:29.623 DEBUG 3203 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect        : Enter: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with argument[s] = []
2017-08-04 22:59:29.623 DEBUG 3203 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect        : Exit: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes()

我不知道这一切从何而来。

编辑 - - - - - - - - - - - - - - - - - -

问题可能是当我运行npm install它的安装后脚本时"postinstall": "yarn run webpack:build"抛出错误:

ERROR in ./~/css-loader!./~/postcss-loader!./~/sass-loader/lib/loader.js!./src/main/webapp/content/scss/vendor.scss
Module build failed: TypeError: Invalid PostCSS Plugin found: [0]
    at /Users/xxxxxxx/dev/projects/registrytest/node_modules/postcss-load-plugins/lib/plugins.js:32:17
    at Array.forEach (native)
    at plugins (/Users/xxxxxxx/dev/projects/registrytest/node_modules/postcss-load-plugins/lib/plugins.js:21:15)
    at /Users/xxxxxxx/dev/projects/registrytest/node_modules/postcss-load-config/index.js:64:18
    at <anonymous>
 @ ./src/main/webapp/content/scss/vendor.scss 4:14-194
 @ ./src/main/webapp/app/vendor.ts
 @ dll vendor
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jhipster-registry@3.1.0 postinstall: `yarn run webpack:build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the jhipster-registry@3.1.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/xxxxxx/.npm/_logs/2017-08-05T07_44_08_129Z-debug.log

我跑:

  • OS X 10.11.6
  • 节点:8.2.1
  • npm:5.3.0
4

1 回答 1

0

这是一个依赖问题。我的解决方案是:

node.js从版本降级,8 to 6.11因为node-sass不支持node.js 8. 然后我升级sass-loader, node-sass and postcss-loader到最新版本。

我不知道这是否是要走的路,但它对我有用。

于 2017-08-06T12:11:42.907 回答