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

component don't support webpack to build #24

Open
kidyfirst opened this issue Jul 16, 2015 · 6 comments
Open

component don't support webpack to build #24

kidyfirst opened this issue Jul 16, 2015 · 6 comments

Comments

@kidyfirst
Copy link

i install your component by npm install --save react-menu and use it according your demo.
but it throw error when i build my project by webpack.
ERROR in ./~/react-menu/lib/components/MenuOption.js
Module parse failed: F:\src\tencentGit\mad-ui-richinput\node_modules\react-menu\lib\components\MenuOption.js Line 68: Unexpected token <
You may need an appropriate loader to handle this file type.
| render: function() {
| return (
| <div
| onClick={this.handleClick}
| onKeyUp={this.handleKeyUp}

maybe your component should't not include the jsx or webpack don't support to build npm dependence.

@knomedia
Copy link
Contributor

Hi kidyfirst. Is it possible that you could gist (or jsbin) your files so I can better understand the issue?

@jeffkole
Copy link

I think @kidyfirst is experiencing the same issue I had, which I asked about in #22 and gave a sample PR for in #23.

@jshthornton
Copy link

+1

@JuanbiB
Copy link

JuanbiB commented Mar 22, 2016

+1
Same issue here... Can't really test this without webpack :/
Anyone find a workaround?

@jeffkole
Copy link

@JuanbiB You may want to check out #26. You should be able to build from that if you use "react-menu": "git://github.com/joinoneroom/react-menu.git#support-multiple-module-systems" in package.json.

@adelespinasse
Copy link

@jeffkole Installing from that fork, I get this error from webpack:

ERROR in ./node_modules/react-menu/dist/lib/components/Menu.js
Module not found: Error: Can't resolve 'react/lib/cloneWithProps' in '/home/aldel/woodchuck/node_modules/react-menu/dist/lib/components'
 @ ./node_modules/react-menu/dist/lib/components/Menu.js 5:21-56
 @ ./node_modules/react-menu/dist/lib/index.js
...

I think it's just out of date with React (not surprising since it's been 2.5 years). But it basically means this package isn't usable with modern dev environments.

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

6 participants