Jhipster:mvn包问题

时间:2018-03-27 12:21:50

标签: node.js jhipster

我必须维护一个jhipster v3.0网络应用程序 我知道这个版本不再受支持了,但也许你们中的一些人已经面临这个问题,并且能够帮助我。

我已经安装了Node,NPM,Yo,Bower和GULP。

当我在我的网络应用上运行mvn -Pprod package -Dmaven.test.skip=true时,我收到此错误:

[INFO] node version :
v8.10.0
[INFO] npm version :
5.6.0
[INFO] --------------------------------------
[INFO]          NPM INSTALL
[INFO] --------------------------------------
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

up to date in 5.803s
[INFO] bower version :
1.8.2
[INFO] --------------------------------------
[INFO]          BOWER INSTALL --NO-COLOR
[INFO] --------------------------------------
bower                     invalid-meta for:/home/myapp/Documents/workspaces/aprhmyapp/bower.json
bower                     invalid-meta The "name" is recommended to be lowercase, can contain digits, dots, dashes
bower angular-cookies extra-resolution Unnecessary resolution: angular-cookies#1.5.2
[INFO] gulp version :
[14:17:21] CLI version 3.9.1
[14:17:21] Local version 3.9.1
[INFO] --------------------------------------
[INFO]          GULP TEST --NO-COLOR
[INFO] --------------------------------------
[14:17:22] Using gulpfile ~/Documents/workspaces/aprhmyapp/gulpfile.js
[14:17:22] Starting 'wiredep:test'...
[14:17:22] Starting 'ngconstant:dev'...
[14:17:22] 'ngconstant:dev' errored after 29 ms
[14:17:22] Error in plugin 'gulp-tslint-log'
TypeError: Path must be a string. Received null
    at assertPath (path.js:28:11)
    at Object.dirname (path.js:1349:5)
    at getFilePath (/home/myapp/Documents/workspaces/aprhmyapp/node_modules/gulp-ng-constant-fork/index.js:95:27)
    at DestroyableTransform.objectStream [as _transform] (/home/myapp/Documents/workspaces/aprhmyapp/node_modules/gulp-ng-constant-fork/index.js:60:25)
    at DestroyableTransform.Transform._read (/home/myapp/Documents/workspaces/aprhmyapp/node_modules/gulp-ng-constant-fork/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at DestroyableTransform.Transform._write (/home/myapp/Documents/workspaces/aprhmyapp/node_modules/gulp-ng-constant-fork/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at doWrite (/home/myapp/Documents/workspaces/aprhmyapp/node_modules/gulp-ng-constant-fork/node_modules/readable-stream/lib/_stream_writable.js:237:10)
    at writeOrBuffer (/home/myapp/Documents/workspaces/aprhmyapp/node_modules/gulp-ng-constant-fork/node_modules/readable-stream/lib/_stream_writable.js:227:5)
    at DestroyableTransform.Writable.write (/home/myapp/Documents/workspaces/aprhmyapp/node_modules/gulp-ng-constant-fork/node_modules/readable-stream/lib/_stream_writable.js:194:11)
    at DestroyableTransform.Writable.end (/home/myapp/Documents/workspaces/aprhmyapp/node_modules/gulp-ng-constant-fork/node_modules/readable-stream/lib/_stream_writable.js:352:10)
    at ngConstantPlugin (/home/myapp/Documents/workspaces/aprhmyapp/node_modules/gulp-ng-constant-fork/index.js:33:16)
    at Gulp.<anonymous> (/home/myapp/Documents/workspaces/aprhmyapp/gulpfile.js:164:12)
    at module.exports (/home/myapp/Documents/workspaces/aprhmyapp/node_modules/orchestrator/lib/runTask.js:34:7)
    at Gulp.Orchestrator._runTask (/home/myapp/Documents/workspaces/aprhmyapp/node_modules/orchestrator/index.js:273:3)
    at Gulp.Orchestrator._runStep (/home/myapp/Documents/workspaces/aprhmyapp/node_modules/orchestrator/index.js:214:10)
    at Gulp.Orchestrator.start (/home/myapp/Documents/workspaces/aprhmyapp/node_modules/orchestrator/index.js:134:8)

1 个答案:

答案 0 :(得分:1)

您正在使用过时的节点版本:v8.10.0。

在JHipster 3时,可能是节点4.x,尝试降级并考虑使用节点环境管理器轻松切换版本。

此外,考虑编辑你的pom.xml以替换yeon-maven-plugin由frontend-maven-plugin,它允许你指定节点和相关工具的版本(npm,bower,gulp)来隔离你的prod构建来自你的开发环境。这就是JHipster 4使用的。