2014-02-23 52 views
2

爲什麼我會收到此錯誤?我只有裝了幾件事情,grunt, grunt-cli, bower, nib, stylus, uglify-jsjade無法找到@import文件nib.styl

DylanMBPr:Test dylanopet$ stylus -w /Users/dylanopet/Dropbox/Projects/Test watching /usr/local/lib/node_modules/stylus/lib/functions/index.styl 
Error: /Users/dylanopet/Dropbox/Projects/Test/style.styl:1 
1| @import 'nib' 
failed to locate @import file nib.styl 
at Evaluator.visitImport (/usr/local/lib/node_modules/stylus/lib/visitor/evaluator.js:882:21) 
at Evaluator.Visitor.visit (/usr/local/lib/node_modules/stylus/lib/visitor/index.js:28:40) 
at Evaluator.visit (/usr/local/lib/node_modules/stylus/lib/visitor/evaluator.js:159:18) 
at Evaluator.visitRoot (/usr/local/lib/node_modules/stylus/lib/visitor/evaluator.js:713:27) 
at Evaluator.Visitor.visit (/usr/local/lib/node_modules/stylus/lib/visitor/index.js:28:40) 
at Evaluator.visit (/usr/local/lib/node_modules/stylus/lib/visitor/evaluator.js:159:18) 
at Evaluator.evaluate (/usr/local/lib/node_modules/stylus/lib/visitor/evaluator.js:234:15) 
at Renderer.render (/usr/local/lib/node_modules/stylus/lib/renderer.js:80:26) 
at /usr/local/lib/node_modules/stylus/bin/stylus:534:15 
at fs.js:266:14 

這是我的錯誤日誌:

0 info it worked if it ends with ok 
1 verbose cli [ '/usr/local/Cellar/node/0.10.24/bin/node', 
1 verbose cli '/usr/local/bin/npm', 
1 verbose cli 'test' ] 
2 info using [email protected] 
3 info using [email protected] 
4 error Error: ENOENT, open '/Users/dylanopet/Dropbox/Projects/Test/package.json' 
5 error If you need help, you may report this *entire* log, 
5 error including the npm and node versions, at: 
5 error  <http://github.com/isaacs/npm/issues> 
6 error System Darwin 13.0.0 
7 error command "/usr/local/Cellar/node/0.10.24/bin/node" "/usr/local/bin/npm" "test" 
8 error cwd /Users/dylanopet/Dropbox/Projects/Test 
9 error node -v v0.10.24 
10 error npm -v 1.3.21 
11 error path /Users/dylanopet/Dropbox/Projects/Test/package.json 
12 error code ENOENT 
13 error errno 34 
14 verbose exit [ 34, true ] 

任何幫助,將不勝感激!

更新:當我加入下面..

stylus -u nib style.styl 

它編譯就好了一切!任何理由,爲什麼我不能簡單地看着它正常工作?

回答

3

解決我的問題,我不得不補充..

stylus -u nib -w <dir> 

我還是很想知道,爲什麼我不能只是簡單的做筆-w了..但是,這似乎解決它現在。

+3

該代碼的作用是什麼?這是不完整的答案,除非你提供一個簡短的描述。 –

+0

我真的希望我知道和其他人可以幫助解釋,你是正確的不完整,但如果有人只是需要它的工作,它現在做:-) 仍然沒有線索爲什麼!不再使用手寫筆。感謝評論哥們。 – DoPeT