为什么我会收到此错误?我只安装了一些内容,grunt, grunt-cli, bower, nib, stylus, uglify-js
和jade
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 npm@1.3.21
3 info using node@v0.10.24
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
它编译得很好,一切都好!任何理由,为什么我不能简单地看它并且工作?
答案 0 :(得分:4)
要解决我的问题,我必须添加..
stylus -u nib -w <dir>
我仍然很想知道为什么我不能简单地做手写笔-w ..但现在这似乎解决了它。