2017-09-15 234 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中紗線?把它們混合起來通常是一個糟糕的主意 –