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

ModuleNotFoundError with webpack #24

Open
ulisesbocchio opened this issue Nov 11, 2016 · 0 comments
Open

ModuleNotFoundError with webpack #24

ulisesbocchio opened this issue Nov 11, 2016 · 0 comments

Comments

@ulisesbocchio
Copy link

ulisesbocchio commented Nov 11, 2016

I get a ModuleNotFoundError: Module not found: Error: Cannot resolve module 'alt-utils' when I try to use this library.

I'm importing it connectToStores like this:

import connectToStores from 'alt-utils/lib/connectToStores';

And this is my resolver webpack config:

resolve: {
        modulesDirectories: ['./src', './node_modules'],
        extensions: ['','.js', '.jsx', '.json']
    }, 

Any idea how can I get this to work?
All other imports work as expected

EDIT: The import seems not to be a problem, but the webpack entry configuration:

entry: {
        fetch: 'whatwg-fetch',
        app: path.join(__dirname, './src/index.jsx'),
        vendor: [
            'react',
            'react-dom',
            'react-router',
            'react-router-bootstrap',
            'react-bootstrap',
            'react-bootstrap-date-picker',
            'react-select',
            'react-tagsinput',
            'react-lazyload',
            'react-loader',
            'react-dropzone',
            'react-pdf-js',
            'react-waypoint',
            'alt',
            'alt-utils',
            'alt-container',
            'moment',
            'lodash',
            'three',
            'js-cookie'
        ]
    }

When alt-utils is in that list I get the ModuleNotFoundError error

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

1 participant