Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import Accordion from 'rc-accordion' 时报错 #3

Closed
ggchxx opened this issue Jul 10, 2015 · 4 comments
Closed

import Accordion from 'rc-accordion' 时报错 #3

ggchxx opened this issue Jul 10, 2015 · 4 comments

Comments

@ggchxx
Copy link

ggchxx commented Jul 10, 2015

.//rc-accordion/src/index.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./Accordion in /Volumes/ZBMOBI/React/ReactWebPackDemo/node_modules/rc-accordion/src
resolve file
/Volumes/ZBMOBI/React/ReactWebPackDemo/node_modules/rc-accordion/src/Accordion doesn't exist
/Volumes/ZBMOBI/React/ReactWebPackDemo/node_modules/rc-accordion/src/Accordion.js doesn't exist
resolve directory
/Volumes/ZBMOBI/React/ReactWebPackDemo/node_modules/rc-accordion/src/Accordion/package.json doesn't exist (directory description file)
/Volumes/ZBMOBI/React/ReactWebPackDemo/node_modules/rc-accordion/src/Accordion doesn't exist (directory default file)
[/Volumes/ZBMOBI/React/ReactWebPackDemo/node_modules/rc-accordion/src/Accordion]
[/Volumes/ZBMOBI/React/ReactWebPackDemo/node_modules/rc-accordion/src/Accordion.js]
@ ./
/rc-accordion/src/index.js 2:17-39

@shepherdwind
Copy link
Contributor

我试下看看

@shepherdwind
Copy link
Contributor

发现问题了,原来没有.npmignore,npm上是src的内容

@shepherdwind
Copy link
Contributor

$ npm install rc-collapse

试试,API有所调整,默认是折叠面板,如果需要手风琴,请配置属性accordion={true}.

@ggchxx
Copy link
Author

ggchxx commented Jul 10, 2015

好的 我用一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants