我正在嘗試在node package-manager支持的本地主機生產上定製的WordPress安裝的例行測試。在實例化WordPress核心文件後,確保成功連接到數據庫並更新了一些資源,我試圖將目錄更改爲相應的WordPress主題文件以運行npm install
(成功)的node-package-manager安裝命令,然後按照例行程序嘗試執行帶有npm run build
的CSS編譯器;然而,在這樣的嘗試,我遇到了我下面的終端輸出中的以下錯誤:npm運行構建錯誤,沒有這樣的文件或目錄,打開'build/bundle.css'
vetsi npm run build
> @ build /Users/alexsingleton/Sites/vetsi/wp-content/themes/vetsi
> npm-run-all --silent compile:css compile:js
/Users/alexsingleton/Sites/vetsi/wp-content/themes/vetsi/node_modules/stylus/bin/stylus:715
if (err) throw err;
^
Error: ENOENT: no such file or directory, open 'build/bundle.css'
at Error (native)
ERROR: compile:css: None-Zero Exit(1);
npm ERR! Darwin 16.4.0
npm ERR! argv "/Users/alexsingleton/.nvm/versions/node/v4.4.4/bin/node" "/Users/alexsingleton/.nvm/versions/node/v4.4.4/bin/npm" "run" "build"
npm ERR! node v4.4.4
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ build: `npm-run-all --silent compile:css compile:js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ build script 'npm-run-all --silent compile:css compile:js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm-run-all --silent compile:css compile:js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/alexsingleton/.npm/_logs/2017-02-15T17_48_20_907Z-debug.log
➜ vetsi
我試着更新都與npm install -g npm
節點包管理器,並與nvm ls
生成驗證對應於另一個成功的本地主機生產正確的版本下面的輸出:
vetsi nvm ls
v0.12.7
-> v4.4.4
system
default -> 4.4.4 (-> v4.4.4)
node -> stable (-> v4.4.4) (default)
stable -> 4.4 (-> v4.4.4) (default)
iojs -> iojs- (-> N/A) (default)
➜ vetsi
不用說,上面的錯誤排除從任何渲染網頁本地主機,但我可以成功訪問和WordPress的內容管理系統中進行瀏覽。我將不勝感激任何指導 - 謝謝!