2017-09-15 235 views
0

获得以下错误创建督促建立与通过下面的选项jhipster 用户产生了新的代码时: 1.monolithic应用
2.Do要使用JHipster注册表配置 - 无
3. JWT认证
4. H2数据库与磁盘持久
5.no缓存
6行家使用
7.的WebSockets弹簧
8.角4
9.无CSS processo使用以下命令在Windows
mvnw -Pprodjhispter督促建设不能创建

而且这个命令被安装在节点和纱线本地

[R
10.no国际
11.没有测试框架
12.no其他发电机

[INFO] [4/4] Building fresh packages... 
[ERROR] error D:\ws\15_sep\node_modules\spawn-sync: Command failed. 
[INFO] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. 
[ERROR] Exit code: 1 
[ERROR] Command: C:\WINDOWS\system32\cmd.exe 
[ERROR] Arguments: /d /s /c node postinstall 
[ERROR] Directory: D:\ws\15_sep\node_modules\spawn-sync 
[ERROR] Output: 
[ERROR] module.js:471 
[ERROR]  throw err; 
[ERROR] ^
[ERROR] 
[ERROR] Error: Cannot find module 'D:\ws\15_sep\node_modules\spawn-sync\postinstall' 
[ERROR]  at Function.Module._resolveFilename (module.js:469:15) 
[ERROR]  at Function.Module._load (module.js:417:25) 
[ERROR]  at Module.runMain (module.js:604:10) 
[ERROR]  at run (bootstrap_node.js:389:7) 
[ERROR]  at startup (bootstrap_node.js:149:9) 
[ERROR]  at bootstrap_node.js:504:3 

回答

0

目前我能够创建构建战争文件,首先通过运行以下命令运行dev构建

npm install 

,然后从从pom.xml文件 督促简介下面的执行,然后运行督促建立

     <execution> 
           <id>install node and yarn</id> 
           <goals> 
            <goal>install-node-and-yarn</goal> 
           </goals> 
           <configuration> 
            <nodeVersion>${node.version}</nodeVersion> 
            <yarnVersion>${yarn.version}</yarnVersion> 
           </configuration> 
          </execution> 
          <execution> 
           <id>yarn install</id> 
           <goals> 
            <goal>yarn</goal> 
           </goals> 
           <configuration> 
            <arguments>install</arguments> 
           </configuration> 
          </execution> 

,然后运行督促建立

mvnw -Pprod 
+0

我很困惑你为什么要用'npm install'然后在你的pom中纱线?把它们混合起来通常是一个糟糕的主意 –