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

Doesn't work with Webpack 2 #24

Closed
unyo opened this issue Jul 21, 2016 · 21 comments
Closed

Doesn't work with Webpack 2 #24

unyo opened this issue Jul 21, 2016 · 21 comments

Comments

@unyo
Copy link

unyo commented Jul 21, 2016

Currently getting the following error using Webpack 2:

Uncaught Error: Cannot find module "style!css!less!./font-awesome-styles!./font-awesome.config.js"

Module not found: Error: Can't resolve './font-awesome-styles' in '/Users/unyo/ocean/node_modules/font-awesome-webpack'
resolve './font-awesome-styles' in '/Users/unyo/ocean/node_modules/font-awesome-webpack'

@unyo
Copy link
Author

unyo commented Jul 21, 2016

I wonder how you link issues (sorry first pull request) #25

@ericmdantas
Copy link

Yup, same problem here.

@tamasd
Copy link

tamasd commented Aug 5, 2016

I have the same problem as well.

@banacorn
Copy link

+1

@tamasd
Copy link

tamasd commented Aug 24, 2016

I created a temporary fork until this issue gets resolved: https://www.npmjs.com/package/font-awesome-webpack2

@hwupu
Copy link

hwupu commented Aug 25, 2016

@tamasd bravo!

@Ugarz
Copy link

Ugarz commented Sep 2, 2016

Hey @tamasd thanks dude 🍻 !

@unsafecode
Copy link

@tamasd Is there a specific reason to use the less version? I came across an annoying issue when using npm shrinkwrap, which was caused by less and less-loader.

@tamasd
Copy link

tamasd commented Sep 22, 2016

@unsafecode in my fork I only merged a very small PR that makes it work with the newer webpack versions. Your issue is present in the original package as well.

@Achieve777
Copy link

@tamasd Can't resolve 'font-awesome/less/stacked.less

@aelkz
Copy link

aelkz commented Jan 24, 2017

Same error for me.. Can't find a solution!

Error: Cannot find module 'style-loader!css-loader!less-loader!./font-awesome-styles.loader!./font-awesome.config.js' from ...

my dependencies in package.json:

"dependencies": {
"bulma": "^0.3.1",
"css": "^2.2.1",
"css-loader": "^0.25.0",
"file-loader": "^0.9.0",
"font-awesome": "^4.7.0",
"font-awesome-webpack2": "0.0.6",
"less": "^2.7.2",
"less-loader": "^2.2.3",
"style-loader": "^0.13.1",
"sweetalert": "^1.1.3",
"url-loader": "^0.5.7",
"vue": "^2.1.0",
"vue-resource": "^1.0.3"
},

and require('font-awesome-webpack2') in main.js file.

@simonh1000
Copy link

I'm experiencing the same problem.
I add

      { test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "url-loader?limit=10000&minetype=application/font-woff" },
      { test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "file-loader" }

to webpack.config.js and added require("font-awesome-webpack2"); to index.js.
That results in

ERROR in Cannot find module 'less'
 @ ./~/font-awesome-webpack/~/style-loader!./~/font-awesome-webpack/~/css-loader!./~/less-loader!./~/font-awesome-webpack/font-awesome-styles.loader.js!./~/font-awesome-webpack/font-awesome.config.js 4:14-144 13:2-17:4 14:20-150

I do not have less installed.

What is the way forward?

@danii1
Copy link

danii1 commented Jan 26, 2017

@tamasd have you figured out how to use extract-text-webpack-plugin with your fork and webpack 2? It works with styleLoader: 'style-loader!css-loader!less-loader', but haven't figured how to make extract-text work, either errors or all fa-* styles end up in js...

@wolfadex
Copy link
Collaborator

This should be resolved by #23 which is now merged. I will close this after a #23 has been released.

@wolfadex
Copy link
Collaborator

@tamasd would you like to merge your fork back in?

@tamasd
Copy link

tamasd commented Feb 14, 2017

No, afaik there's nothing in important in it anymore.

@wolfadex
Copy link
Collaborator

I'm closing this issue as it does work with webpack2 now. If anyone has any outstanding issues in this ticket, please open them as new separate issues.

@winnemucca
Copy link

@wolfadex I am still getting the exact same errors. Do you have a repository that shows this working? I have been working on this following the npm instructions for over an hour now.

https://www.npmjs.com/package/font-awesome-sass-loader

@arpowers
Copy link

arpowers commented May 30, 2017

the bug is that they have forgotten to add the original 'font awesome' npm as a dependency

@realfresh
Copy link

realfresh commented Jul 10, 2017

If your missing stacked.less or other files, npm install font-awesome. As the poster above said, its missing font-awesome as a dependency. Same with anything else, if your missing "less" or "url-loader" or whatever, just install --save-dev it

@yavir-me
Copy link

npm i --save font-awesome
should resolve your problems. Regards, Andrey.

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