2016-11-28 37 views
1

我使用jade-cli將.jade文件中的項目編譯爲.html。Jade-cli - 保存文件夾結構給出錯誤

玉文件具有以下層次:

components 
    views 
    templates 
    ... 

我想要呈現的結果,因爲它是在文檔說這裏有相同的文件夾結構,並試圖使用-H屬性:https://www.npmjs.com/package/jade-cli

然而,當我使用命令以下錯誤jade -P -H src -o dst NPM回報:

silly lifecycle @~build: Args: [ '/d /s /c', 'jade -P -H src -o dst' ] 
    12 silly lifecycle @~build: Returned: code: 1 signal: null 
info lifecycle @~build: Failed to exec build script 
verbose stack Error: @ build: `jade -P -H src -o dst` 
verbose stack Exit status 1 
verbose stack  at EventEmitter.<anonymous> (C:\Program  Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16) 
verbose stack  at emitTwo (events.js:106:13) 
verbose stack  at EventEmitter.emit (events.js:191:7) 
verbose stack  at ChildProcess.<anonymous> (C:\Program  Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14) 
verbose stack  at emitTwo (events.js:106:13) 
verbose stack  at ChildProcess.emit (events.js:191:7) 
verbose stack  at maybeClose (internal/child_process.js:877:16) 
verbose stack  at Process.ChildProcess._handle.onexit  (internal/child_process.js:226:5) 
error Windows_NT 6.1.7601 
error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program  Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build" 
error node v6.9.1 
error npm v3.10.8 
error code ELIFECYCLE 
error @ build: `jade -P -H src -o dst` 
error Exit status 1 
error Failed at the @ build script 'jade -P -H src -o  dst'. 
error Make sure you have the latest version of node.js and npm installed. 
error If you do, this is most likely a problem with the package, 
error not with npm itself. 
error Tell the author that this fails on your system: 
error  jade -P -H src -o dst 
error You can get information on how to open an issue for this project  with: 
error  npm bugs 
error Or if that isn't available, you can get their info via: 
error  npm owner ls 
error There is likely additional logging output above. 
verbose exit [ 1, true ] 

如果排除3210一切運行良好。什麼似乎是問題?

NPM版本:6.9.1 玉版本:1.11.0

回答

0

問題已解決。我的錯誤是,我認爲是玉石包裝的一部分。看來,你有單獨使用

npm i jade-cli -g 

-g爲全球安裝它來安裝它。

此編譯成功並創建所有必需的文件夾體系結構