Cannot resolve module 'WHS'
pfulop opened this issue · comments
Importing module in react project throws error:
ERROR in ./~/react-whs/build/react-whs.js
Module not found: Error: Cannot resolve module 'WHS' in /home/user/threejs/node_modules/react-whs/build
@ ./~/react-whs/build/react-whs.js 1:82-96
Is there any special webpack configuration needed?
@pfulop. That happens even with latest bundle? The error comes from webpack config where I forgot to set the package name for commonjs2
type. Can you please try doing npm install
with latest version? If error still exists - then I'll do a build and publish a new version to npm
Yeah I tried reinstalling didn't help. However changing package.json to include your module from git directly helped.
"react-whs": "https://github.com/WhitestormJS/react-whs.git",
So npm has just bad version? Maybe?
@pfulop The error is because of this: https://github.com/WhitestormJS/react-whs/blob/master/webpack.config.babel.js#L27
you are suggesting sticking to including it directly from repository?
@pfulop I'll make a build and publish a new version now.
Thank you very much.
@pfulop Done. Check now. v1.1.4
@pfulop Works? Can you test it?
It works now, thanks ;)
Also, maybe it would be good to add whs as a dependency? Same as three is dependency for whs:
https://github.com/WhitestormJS/whitestorm.js/blob/beta/package.json#L33
@pfulop Makes sense. Thanks. Will do v1.1.5 now =)
By the way, really great work.
I guess I can close this now.
@pfulop Done, thanks!