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

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

Open
iliuyt opened this issue Dec 25, 2017 · 12 comments
Open

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

iliuyt opened this issue Dec 25, 2017 · 12 comments

Comments

@iliuyt
Copy link

iliuyt commented Dec 25, 2017

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
Copy link

dev1337 commented Jan 6, 2018

Facing the same problem.

@qgliu
Copy link

qgliu commented Jan 8, 2018

same here

@dev1337
Copy link

dev1337 commented Jan 8, 2018

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

@alexsandro-xpt
Copy link

Same erro here, it is a problem.

@rmotzko
Copy link

rmotzko commented May 12, 2018

Same issue here.

@asyalas
Copy link

asyalas commented Jul 29, 2018

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
Copy link

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
Copy link

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

@gabfr
Copy link

gabfr commented Aug 8, 2018

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
Copy link

DominusKelvin commented Oct 12, 2018

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

@etobdc
Copy link

etobdc commented Sep 29, 2021

You can fix it by importing the css file:

import NProgress from 'nprogress'
import 'nprogress/nprogress.css'

@faiyazalam
Copy link

faiyazalam commented Jan 19, 2023

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

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