我之前没有使用Storybook的经验,但需要现有项目的样式指南,所以我想我会尝试一下。
我跑了:
npm install -g @storybook/cli@4.0.0-alpha.8
npm install -g @storybook/html@4.0.0-alpha.8
getstorybok --html
npm run storybook
执行npm run storybook
时出现以下错误:
ERROR in C:/Code/node_modules/@storybook/components/dist/addon_panel/index.js
Module not found: Error: Can't resolve 'react' in 'C:\Code\node_modules\@storybook\components\dist\addon_panel'
@ C:/Code/node_modules/@storybook/components/dist/addon_panel/index.js 20:13-29
@ C:/Code/node_modules/@storybook/components/dist/index.js
@ C:/Code/node_modules/@storybook/ui/dist/modules/ui/containers/layout.js
@ C:/Code/node_modules/@storybook/ui/dist/modules/ui/routes.js
@ C:/Code/node_modules/@storybook/ui/dist/modules/ui/index.js
@ C:/Code/node_modules/@storybook/ui/dist/index.js
@ C:/Code/node_modules/@storybook/core/dist/client/manager/index.js
@ multi C:/Code/node_modules/@storybook/html/dist/server/config/polyfills.js C:/Code/node_modules/@storybook/core/dist/client/manager/index.js
我没有在项目中使用反应。它是使用ASP.NET
和jQuery
构建的网站。我正在开发Windows。
有没有解决这些错误的方法?对于我的项目,是否有比Storybook更合适的工具?