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

"ReferenceError: require is not defined" using webpack 2 when running the application #121

Open
esteban-filardi opened this issue Jul 14, 2017 · 1 comment

Comments

@esteban-filardi
Copy link

esteban-filardi commented Jul 14, 2017

Hello, I'm getting this error when running the application. I'm using webpack 2

ReferenceError: require is not defined

Here's how I import the module on index.js

import ngWebSocket from 'angular-websocket';
...
angular.module('app', [
   ...
  'ngWebSocket'
]);

I tried looking for a solution in the issues, change things on webpack.config.js, but none of the solutions worked.

@lifecoderua
Copy link

Check the line of error. Most probably your webpack doesn't parse angular-websocket, which utilises require. Upon parse enabling you would face #103

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

2 participants