meyda: Cannot find module "meyda"
Trying to import
or require
the module after installing (tried both yarn
and npm
) gives me Cannot find module "meyda"
.
And indeed, the package.json
for this module says "main": "./dist/node/main.js"
, but there is no such folder. This is probably related to https://github.com/hughrawlinson/meyda/issues/112. I don’t have a dist
folder in my node_modules/meyda
. Also, the suggested unpkg link confirms that the package isn’t distributed with the dist
folder (which is suggested in the Wiki).
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (8 by maintainers)
@erezsh @hughrawlinson this should now be fixed and published as
4.1.3
🎉The issue was that the ‘empty npmignore’ trick didn’t work, i.e. npm was falling back to gitignore when publishing, but not when running
npm pack
. We obviously want to gitignore/dist
but we don’t want to npmignore it, so I had to add!dist
to npmignore, which fixed the issue.Sorry about this period of inconvenience and hope you all enjoy the new features!
Great, thanks for helping us figure this out! I’ll close this issue as you say it’s solved, but I’ll open another issue to track the require via browser property. It seems that webpack expects the file in package.json/browser to be a commonjs module, which is weird to me, but if more people report this, we’ll take that to be the correct behaviour.
Enjoy the feature extracting, please let us know when you’ve built something cool!
Interesting. I was deleting just
meyda
fromnode_modules
(either withnpm
command or withrm -rf
) and re-installing, but the issue remained. When I nuked the wholenode_modules
, I got it to work. I have to import frommayda/dist/node/main.js
explicitly now though, but I don’t mind it.I don’t have access to
webpack.config.js
, as I don’t want toeject
thecreate-react-app
(it hides away the build process, and I don’t want to fiddle with it).So as far as I’m concerned, this is solved (since you provided the webpack configuration thing for people who have access to it). 👌
Now on to figuring out how to extract features! 💃
Hey @lazarljubenovic - @2xAA and I will work on fixing this today 😃