运行nucleus-styleguide

时间:2016-09-16 11:08:46

标签: node.js

我尝试使用nucleus来制作样式指南。根据官方页面link逐步安装。

他们的网站非常好,但外面缺少文档。所以也许有人在这里帮忙:)。

当我跑步时(npm run styleguide)我收到错误:

Mac-Admin:nodesubsite3 admin$ npm run styleguide
  

sub-fortunalivecomua@0.0.0 styleguide / Users / admin / IdeaProjects / nodesubsite3   nucleus --config config.nucleus.json

/Users/admin/IdeaProjects/nodesubsite3/node_modules/glob/sync.js:30
throw new Error('must provide pattern')
^

Error: must provide pattern
at new GlobSync (/Users/admin/IdeaProjects/nodesubsite3/node_modules/glob/sync.js:30:11)
at Function.globSync [as sync] (/Users/admin/IdeaProjects/nodesubsite3/node_modules/glob/sync.js:25:10)
at Object.Config.getFilesFromGlob (/Users/admin/IdeaProjects/nodesubsite3/node_modules/nucleus-styleguide/src/Config.js:120:26)
at Object.Config.parse (/Users/admin/IdeaProjects/nodesubsite3/node_modules/nucleus-styleguide/src/Config.js:86:31)
at Object.<anonymous> (/Users/admin/IdeaProjects/nodesubsite3/node_modules/nucleus-styleguide/index.js:41:21)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "styleguide"
npm ERR! node v6.5.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! sub-fortunalivecomua@0.0.0 styleguide: `nucleus --config config.nucleus.json`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sub-fortunalivecomua@0.0.0 styleguide script 'nucleus --config config.nucleus.json'.
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 sub-fortunalivecomua package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     nucleus --config config.nucleus.json
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs sub-fortunalivecomua
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls sub-fortunalivecomua
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/admin/IdeaProjects/nodesubsite3/npm-debug.log

1 个答案:

答案 0 :(得分:1)

此错误来自向导生成的config.nucleus.json文件。因为你离开了参数&#34; files&#34;空白,它在json中插入了这段代码:

"files": [
  ""
],

只需删除它就可以正常编译。