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

module error with webpack #18

Open
torquemad opened this issue Feb 28, 2018 · 3 comments
Open

module error with webpack #18

torquemad opened this issue Feb 28, 2018 · 3 comments

Comments

@torquemad
Copy link

This commit 80783b2 seems to have have broken compatibility with Webpack projects when resolving dependencies

./node_modules/metascraper/node_modules/require-from-string/index.js
Module not found: Can't resolve 'module' in '/project/node_modules/metascraper/node_modules/require-from-string'

@crubier
Copy link

crubier commented Jul 28, 2018

Same problem here, "module" is missing from dependencies in package.json. Can someone fix this ?

@ORESoftware
Copy link

ORESoftware commented Nov 22, 2018

hmmm if you look in the source it's calling:

const Module = require('module');

see this line: https://github.com/floatdrop/require-from-string/blob/master/index.js#L3

I think to fix it, we could use this instead:

const Module = module.constructor;

my guess is that was this line was the change that occurred, which caused the breakage. Note that 'module' is a core Node.js module, so this seems peculiar:

https://stackoverflow.com/questions/35824135/exact-list-of-node-core-modules

@saurabh-deep
Copy link

I am also facing the same issue. Will someone be looking into this please?

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

4 participants