gowravshekar / font-awesome-webpack

font-awesome package for webpack
MIT License
192 stars 49 forks source link

Error: Can't resolve './font-awesome-styles' when upgrading to webpack@2.1.0-beta.6 #20

Closed jimbolla closed 8 years ago

jimbolla commented 8 years ago

If I upgrade from webpack 1.x to 2.1.0-beta.6 I get the error

ERROR in ./~/font-awesome-webpack/index.js
Module not found: Error: Can't resolve './font-awesome-styles' in 'C:\Projects\git\AppCenter\AppCenter.WebApp\Assets\node_modules\font-awesome-webpack'
 @ ./~/font-awesome-webpack/index.js 1:0-72

The error goes away if I edit ...\node_modules\font-awesome-webpack\index.js from

require("style!css!less!./font-awesome-styles!./font-awesome.config.js");

to

require("style!css!less!./font-awesome-styles.loader!./font-awesome.config.js");
JoeMattie commented 8 years ago

Here's an entirely userspace fix (no need to edit the file in node_modules)

import 'style!css!less!font-awesome-webpack/font-awesome-styles.loader!font-awesome-webpack/font-awesome.config.js';

or

require('style!css!less!font-awesome-webpack/font-awesome-styles.loader!font-awesome-webpack/font-awesome.config.js');
yilinglu commented 8 years ago

Should this fix by JoeMattie be integrated into the index.js file in the source code?

eMerzh commented 8 years ago

Hi, still have the issue with webpack2 too.. is it possible to fix this before the release of the stable release?

kopax commented 7 years ago

Still have the issue with webpack2 as well

karvapallo commented 7 years ago

Yeah I'm still having this issue as well. The fix given by @JoeMattie did not work for me.

wolfadex commented 7 years ago

Release 0.0.5-beta.2 should fix this issue for you, a release 0.0.6 still needs to be made so that this is no longer an issue with normal installs of font-awesome-webpack.

Sorry for the delay in getting 0.0.6 out, I'll try to get it out soon.