question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webpack/React Install

See original GitHub issue

So, I have been trying for several hours to get this to work properly with webpack for a react project. If I include the JS either via requiring directly to the materialize.js file or by importing the framework I get the following error during compile. Anyone got any ideas how to fix this.

It all seems to load fine and the JavaScript functions and CSS stuff all works properly, but I would really like to make this error go away.

WARNING in ./~/jquery/dist/jquery.js
There is another module with an equal name when case is ignored.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Rename module if multiple modules are expected or use equal casing if one module is expected.

WARNING in ./~/jQuery/dist/jquery.js
There is another module with an equal name when case is ignored.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Rename module if multiple modules are expected or use equal casing if one module is expecked.

Thanks

Gareth

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
pistoucommented, Jan 25, 2016

I solved this error without having to edit materialize-css bin file. In your webpack.config.js, simply add the following rule:

module.exports = {
    // ...
    resolve: {
        alias: {
            jQuery: "path/to/jquery/dist/jquery"
        }
    }
    // ...
};
0reactions
antoinejaussoincommented, Feb 9, 2016

@pistou 's solution works like a charm. Merci beaucoup !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation | webpack
To run the local installation of webpack you can access its binary version as node_modules/.bin/webpack . Alternatively, if you are using npm v5.2.0...
Read more >
How to Install Webpack with React JS from Scratch?
Install Webpack in React · 1. Install npm int | Installing dependencies · 2. Set up Project Structure · 3. Create a simple...
Read more >
Webpack - npm
Webpack is a bundler for modules. The main purpose is to bundle JavaScript files for usage in a browser, yet it is also...
Read more >
Setup react with webpack and babel - Medium
First, we need to install webpack to our project. ... This install 3 packages main webpack package, webpack-cli to run webpack commands and...
Read more >
How to Setup Webpack with React JS? - KnowledgeHut
Install Webpack in React · Set Up Project Structure · Create a Simple React App · Utilizing Loaders · Configure React-webpack · Bundle...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found