{"action":"created","issue":{"url":"https://api.github.com/repos/Atnic/laravel-admin-lte/issues/4","repository_url":"https://api.github.com/repos/Atnic/laravel-admin-lte","labels_url":"https://api.github.com/repos/Atnic/laravel-admin-lte/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/Atnic/laravel-admin-lte/issues/4/comments","events_url":"https://api.github.com/repos/Atnic/laravel-admin-lte/issues/4/events","html_url":"https://github.com/Atnic/laravel-admin-lte/issues/4","id":297999185,"number":4,"title":"Webpack can't find (font) dependencies","user":{"login":"WKrooshof","id":4234432,"avatar_url":"https://avatars2.githubusercontent.com/u/4234432?v=4","gravatar_id":"","url":"https://api.github.com/users/WKrooshof","html_url":"https://github.com/WKrooshof","followers_url":"https://api.github.com/users/WKrooshof/followers","following_url":"https://api.github.com/users/WKrooshof/following{/other_user}","gists_url":"https://api.github.com/users/WKrooshof/gists{/gist_id}","starred_url":"https://api.github.com/users/WKrooshof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WKrooshof/subscriptions","organizations_url":"https://api.github.com/users/WKrooshof/orgs","repos_url":"https://api.github.com/users/WKrooshof/repos","events_url":"https://api.github.com/users/WKrooshof/events{/privacy}","received_events_url":"https://api.github.com/users/WKrooshof/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-17T11:48:58Z","updated_at":"2018-02-18T10:34:41Z","closed_at":null,"author_association":"NONE","body":"NPM/Webpack can't find dependencies with Laravel Mix\r\n```\r\n    These dependencies were not found:\r\n    \r\n    * font-awesome\r\n    * ionicons\r\n```\r\n```\r\n    ERROR in multi lodash jquery bootstrap-sass fastclick jquery-slimscroll admin-lte icheck ionicons font-awesome datatables.net datatables.net-bs\r\n    Module not found: Error: Can't resolve 'font-awesome' in 'D:\\Laragon'\r\n     @ multi lodash jquery bootstrap-sass fastclick jquery-slimscroll admin-lte icheck ionicons font-awesome datatables.net datatables.net-bs\r\n```\r\n\r\nMore clearly. These are installed (can find them in node_modules) and require location is correct. I'm also using more packages, and these problems are related to, coincidentally, the only fonts in my webpack.\r\n\r\nThey are available in the `package.json` and `package.json.lock`. \r\n\r\nInstalled trying different methods: firstly `npm install` and `--save-dev`, also tried `yarn install` and `yarn add`. \r\n\r\nMy `webpack.mix.js`:\r\n\r\n```\r\n    let mix = require('laravel-mix');\r\n    \r\n    /*\r\n     |--------------------------------------------------------------------------\r\n     | Mix Asset Management\r\n     |--------------------------------------------------------------------------\r\n     |\r\n     | Mix provides a clean, fluent API for defining some Webpack build steps\r\n     | for your Laravel application. By default, we are compiling the Sass\r\n     | file for the application as well as bundling up all the JS files.\r\n     |\r\n     */\r\n    \r\n    mix.webpackConfig({\r\n        module: {\r\n            loaders: [\r\n                {\r\n                    test: /\\.js?/,\r\n                    exclude: [/node_modules/, /styles/],\r\n                    loaders: ['babel'],\r\n                    include: path.join(__dirname, 'src')\r\n                },\r\n                {\r\n                    test: /\\.scss$/,\r\n                    loader: 'style!css!resolve-url!sass?sourceMap'\r\n                },\r\n                {\r\n                    test: /\\.css$/,\r\n                    loader: \"style-loader!css-loader\"\r\n                },\r\n                {\r\n                    test: /\\.woff(2)?(\\?v=[0-9]\\.[0-9]\\.[0-9])?$/,\r\n                    loader: 'url-loader?limit=10000&mimetype=application/font-woff'\r\n                },\r\n                {\r\n                    test: /\\.(ttf|eot|svg)(\\?v=[0-9]\\.[0-9]\\.[0-9])?$/,\r\n                    loader: 'file-loader'\r\n                }\r\n            ]\r\n        }\r\n    });\r\n    \r\n    mix.js('resources/assets/js/app.js', 'public/js')\r\n       .sass('resources/assets/sass/app.scss', 'public/css');\r\n    \r\n    mix.js('resources/assets/js/auth.js', 'public/js')\r\n       .sass('resources/assets/sass/auth.scss', 'public/css');\r\n    \r\n    mix.js('resources/assets/js/admin-lte.js', 'public/js')\r\n       .sass('resources/assets/sass/admin-lte.scss', 'public/css');\r\n    \r\n    mix.autoload({\r\n        jquery: [ '$', 'jQuery', 'jquery'],\r\n        DataTable: 'datatables.net-bs'\r\n    });\r\n    \r\n    mix.extract([\r\n        'lodash', 'jquery', 'bootstrap-sass',\r\n        'fastclick', 'jquery-slimscroll', 'admin-lte',\r\n        'icheck', 'ionicons', 'font-awesome',\r\n        'datatables.net', 'datatables.net-bs'\r\n    ], 'public/js/vendor.js');\r\n    \r\n    mix.version();\r\n```\r\n\r\nI also tried it without the `mix.webpackConfig`, adding the config this was a desperate attempt to fix the fonts.\r\n\r\nHere is my package.json:\r\n```\r\n    {\r\n        \"private\": true,\r\n        \"scripts\": {\r\n            \"dev\": \"npm run development\",\r\n            \"development\": \"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js\",\r\n            \"watch\": \"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js\",\r\n            \"watch-poll\": \"npm run watch -- --watch-poll\",\r\n            \"hot\": \"cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js\",\r\n            \"prod\": \"npm run production\",\r\n            \"production\": \"cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js\"\r\n        },\r\n        \"devDependencies\": {\r\n            \"admin-lte\": \"^2.4.2\",\r\n            \"axios\": \"^0.17\",\r\n            \"bootstrap\": \"^4.0.0\",\r\n            \"cross-env\": \"^5.1.3\",\r\n            \"datatables.net\": \"^1.10.16\",\r\n            \"fastclick\": \"^1.0.6\",\r\n            \"font-awesome\": \"^4.7.0\",\r\n            \"icheck\": \"^1.0.2\",\r\n            \"ionicons\": \"^3.0.0\",\r\n            \"jquery\": \"^3.3.1\",\r\n            \"jquery-slimscroll\": \"^1.3.8\",\r\n            \"laravel-mix\": \"^2.0\",\r\n            \"lodash\": \"^4.17.4\",\r\n            \"popper.js\": \"^1.12\",\r\n            \"script-loader\": \"^0.7.2\"\r\n        },\r\n        \"dependencies\": {\r\n            \"bootstrap-sass\": \"^3.3.7\",\r\n            \"datatables.net-bs\": \"^1.10.16\"\r\n        }\r\n    }\r\n```\r\n\r\nAnd in my .scss:\r\n```\r\n    @import '~font-awesome/scss/font-awesome';\r\n```\r\n\r\nBoth on Mac and Windows 10\r\n\r\nPS. This probably also causes iCheck to fail.\r\n![image](https://user-images.githubusercontent.com/4234432/36340594-0e69f2ac-13e1-11e8-8ec2-7f5cd444adaa.png)\r\n"},"comment":{"url":"https://api.github.com/repos/Atnic/laravel-admin-lte/issues/comments/366506632","html_url":"https://github.com/Atnic/laravel-admin-lte/issues/4#issuecomment-366506632","issue_url":"https://api.github.com/repos/Atnic/laravel-admin-lte/issues/4","id":366506632,"user":{"login":"frdteknikelektro","id":14815819,"avatar_url":"https://avatars1.githubusercontent.com/u/14815819?v=4","gravatar_id":"","url":"https://api.github.com/users/frdteknikelektro","html_url":"https://github.com/frdteknikelektro","followers_url":"https://api.github.com/users/frdteknikelektro/followers","following_url":"https://api.github.com/users/frdteknikelektro/following{/other_user}","gists_url":"https://api.github.com/users/frdteknikelektro/gists{/gist_id}","starred_url":"https://api.github.com/users/frdteknikelektro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frdteknikelektro/subscriptions","organizations_url":"https://api.github.com/users/frdteknikelektro/orgs","repos_url":"https://api.github.com/users/frdteknikelektro/repos","events_url":"https://api.github.com/users/frdteknikelektro/events{/privacy}","received_events_url":"https://api.github.com/users/frdteknikelektro/received_events","type":"User","site_admin":false},"created_at":"2018-02-18T10:34:41Z","updated_at":"2018-02-18T10:34:41Z","author_association":"CONTRIBUTOR","body":"First not all depedencies can be included in mix.extract, try to remove font-awesome, ionicons, icheck\r\nAnd try to remove mix.webpackConfig() and in your mix file, in scss file i used call css like this\r\n\r\n@import \"node_modules/font-awesome/scss/font-awesome\";\r\n\r\nAs I remember that line is should be included in your resources/assets/sass/admin-lte.scss\r\n\r\n@WKrooshof Let me now if something still not right"}}
{"actor":{"display_login":"frdteknikelektro"}}