2017-06-30 44 views
1

我剛剛創建了我的第一個jhipster應用程序,並按照如何設置我的IDE(eclipse)的說明進行操作。爲什麼新創建的Jhipster項目的身高= 0?

之後,我運行gradle bootRun任務(在eclipse中),一切都很順利。

當我訪問本地主機地址時,頁面是空白的。在firefox(f12)中調查問題,它顯示身體的高度爲0.

在嘗試手動拉伸html主體後,通過在index.html文件中手動將其高度設置爲100vt,再次調查通過f12顯示,新設置已應用(現在的高度爲100vt),但頁面仍然是空白的。

可能是什麼問題?我已經確認,所有需要的文件存在,所以它不能是文件未找到問題

有趣的是,該頁面的名稱顯示在選項卡中。由於名稱是在index.html頭文件中定義的,因此文件必須正確部署,但生成的部分中必須存在某種問題。

編輯

運行yarn run webpack:build

yarn run v0.23.2 
$ yarn run cleanup && yarn run webpack:build:vendor && yarn run webpack:build:dev 
yarn run v0.23.2 
$ rimraf build/{aot,www} 
The command "rimraf" is either spelled incorrectly or could not be found 
error Command failed with exit code 1. 
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 
error Command failed with exit code 1. 
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 

EDIT 2

正如在評論中提到一個人,我可能要運行yarn install,但是這給了我下面的錯誤,我根本不懂...

error C:\CUBE\workspace\cube\node_modules\generator-jhipster: Command failed. 
Exit code: 1 
Command: C:\WINDOWS\system32\cmd.exe 
Arguments: /d /s /c tabtab install --name jhipster --auto 
Directory: C:\CUBE\workspace\cube\node_modules\generator-jhipster 
Output: 
Fri, 30 Jun 2017 14:40:09 GMT tabtab:installer Installing completion script to fish directory 
fs.js:641 
    return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); 
       ^
Error: ENOENT: no such file or directory, open 'C:\CUBE\workspace\cube\node_modules\tabtab\scripts\C:\Program Files\Git\usr\bin\bash.sh' 
    at Error (native) 
    at Object.fs.openSync (fs.js:641:18) 
    at fs.readFileSync (fs.js:509:33) 
    at Complete.script (C:\CUBE\workspace\cube\node_modules\tabtab\src\complete.js:373:14) 
    at Installer.writeTo (C:\CUBE\workspace\cube\node_modules\tabtab\src\installer.js:91:34) 
    at Installer.handle (C:\CUBE\workspace\cube\node_modules\tabtab\src\installer.js:80:21) 
    at Commands.install (C:\CUBE\workspace\cube\node_modules\tabtab\src\commands\index.js:75:22) 
    at Object.<anonymous> (C:\CUBE\workspace\cube\node_modules\tabtab\src\cli.js:33:16) 
    at Module._compile (module.js:570:32) 
    at Object.Module._extensions..js (module.js:579:10) 
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. 
+0

'C:\ CUBE \工作區\立方\ node_modules \ tabtab \腳本\ C:\ Program Files文件\的Git的\ usr \ bin \ bash.sh'不是一個有效的目錄。有些東西在你的配置上搞砸了。這就是爲什麼'紗線安裝'不起作用。 – Nico

+0

@Nico我可以想象,但我沒有在任何地方輸入此路徑,多數民衆贊成在問題......該路徑生成某種方式 –

回答

2

我終於找到了解決辦法:

生成與git bash應用程序時,似乎是在Windows故障發電計劃。

我重新生成應用程序與windows cmd和一切工作按預期...

1

您是否選擇了Angular2?

在這種情況下,您需要編譯前面部分。 用途:

  • yarn run webpack:build
  • 或直接:yarn start

所有指令應該在你的README.md

+0

增加了編輯與輸出 –

+0

運行'紗線安裝',很明顯,你是缺少一些依賴'node_modules'文件夾 –

+0

@GaelMariziou我添加了一個編輯輸出的紗線安裝 –

0

被mentionned看來這一代錯過了什麼。

當我開始使用JHipster時,我遇到了類似的問題。

我按照安裝說明(再次)解決了這些問題。在第一次嘗試時,我遇到了問題,然後重新安裝了所有這些組件,然後重新生成了我的應用程序。

第二次我沒有問題,一切順利!

在我看來,在生成過程中出現了一些錯誤,這就是爲什麼你的頁面變爲空白。嘗試重新安裝或更新您的工具和插件,然後重新生成您的項目。

關注此link瞭解更多信息。

+0

好吧,我已經在不同的機器上重新生成了兩次應用程序。兩者都有同樣的錯誤... –

相關問題