vue-bulma / nprogress

Progress bars is based on nprogress for Vue
MIT License
184 stars 31 forks source link

Failed to find '~nprogress/nprogress.css' after use postcss-import #15

Open iliuyt opened 6 years ago

iliuyt commented 6 years ago

1、vue init webpack test 2、npm install nprogress 3、edit main.js

import NProgress from 'vue-nprogress'

...
...

new Vue({
nprogress: new NProgress({
    parent: '.nprogress-container'
}),

..........

}).$mount('#app')

4、edit App.vue

import NprogressContainer from 'vue-nprogress/src/NprogressContainer'
.....

export default {
    name: 'app',
    components: {
        NprogressContainer
    }
    ....
}

5、npm run dev

ERROR

Module build failed: Error: Failed to find '~nprogress/nprogress.css'
dev1337 commented 6 years ago

Facing the same problem.

qgliu commented 6 years ago

same here

dev1337 commented 6 years ago

Fixed it by going to the original Nprogress repository and take the .css file from there.

alexsandro-xpt commented 6 years ago

Same erro here, it is a problem.

rmotzko commented 6 years ago

Same issue here.

asyalas commented 5 years ago

it works ,if you use vue-cli ,just npm i -D stylus-loader , or you should add stylus-loader in webpack.config.js ,

alexsandro-xpt commented 5 years ago

I don't remember how I fix this issue, but only diff thing I see is that now, I import it like that import NProgress from 'vue-nprogress';

stefanDeveloper commented 5 years ago

Yep I also have the same issue and I didn't figured it out, how to solve it...

gabfr commented 5 years ago

For those like me who didn't manage to get this working, there is a pretty neat plug-and-play alternative progress bar for vue: https://github.com/hilongjw/vue-progressbar#vue-router

DominusKelvin commented 5 years ago

I fixed mine by removing the tilde(~) from the NProgressContainer import of nprogress/nprogress.css. I guess the developer was using a MAC.

etobdc commented 2 years ago

You can fix it by importing the css file:

import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
faiyazalam commented 1 year ago

I have this working in my app.css file: @import "~nprogress/nprogress.css";