Vue-cli: the sass-loader has failed when i use @import '~normalize.css/normalize.css'

Created on 14 Dec 2017  路  3Comments  路  Source: vuejs/vue-cli

The terminal info like '
Module build failed: Error: Failed to find '~normalize.css/normalize.css'
in [
D:\work\vue-layui\src\components
]
'
the vue-loader didn't load the file from node_modules,it's from 'src'.
when i use the relative path @import '../node_modules/normalize.css/normalize.css' it's normal!

node v8.9.3
vue-cli v2.9.2
windows 10

Most helpful comment

@slipkinem @crossgit I'm so sorry!!! This problem was solved after I omitted the suffix '.css';;
like this @import '~normalize.css/normalize'

All 3 comments

@Benzenes How do you deal with this problem, please?

@Benzenes Are you deal?

@slipkinem @crossgit I'm so sorry!!! This problem was solved after I omitted the suffix '.css';;
like this @import '~normalize.css/normalize'

Was this page helpful?
0 / 5 - 0 ratings