gpt4 book ai didi

node.js - 运行nucleus-styleguide时出错

转载 作者:太空宇宙 更新时间:2023-11-04 00:34:54 26 4
gpt4 key购买 nike

我尝试使用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

最佳答案

此错误来自向导生成的 config.nucleus.json 文件。由于您将参数“files”留空,因此它在 json 中插入了以下代码块:

"files": [
""
],

只要删除它,它就会正常编译。

关于node.js - 运行nucleus-styleguide时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39530025/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com