-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Error with image paths (SASS files) #563
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
Comments
since the component is in the |
Two dots same error! |
Well, your component is nested 2 folders deep ( Please read up on relative paths. |
Sorry, I copied the wrong error:
I think its a webpack problem. I imported my main.scss file in App.vue <style lang="scss"> @import './assets/styles/main.scss'; </style> |
Still sounds like the path is incorrect - but as I don't know your project, I can't tell. |
I hava similar issue, when I run
The problem is with the background image at my main.scss but only when testing not in dev:
PD: Maybe related to #208 (comment) |
I have a similar error with vue-style-loader. Searches show it is webpack. Cannot find 'module' when trying to load background image from css/scss as @dimirc. It's being HOURS and many searches. I don't know why the example in vue.js package weren't included? |
I have the same problem, I tried to replicate the problem in the project https://github.com/joohncruz/poc-vuejs-webpack-global-style.
styles.scss .teste-url { Error response: url('./assets/icons/ico_atalho.png'): Error response
|
if help |
I was having the same problem, until i realised that I need to use a tilde ( |
Had the same issue when integrating vue-styleguide with some components that required some fonts from sass file. The solution provided by @mlachance did the trick for me. |
just try like below. You should add '/' before assets folder (If it is assets folder) eg. src="/assets/images/sss.jpg" |
For anyone using sass-loader and separate css file (not inside a
|
@andsav Sadly this does not work for me, perhaps because the scss is in another module, see vuejs/vue-cli#5633. |
Using <!-- relative path -->
<style lang="scss" src="./assets/styles/index.scss"></style>
<!-- module path -->
<style lang="scss" src="my-package/style.scss"></style> |
I am also having same problem |
Hey,
I installed sass-loader and sass-node and everthing works fine, but I have problems with my image paths. I always get this error:
Module not found: Error: Can't resolve './assets/images/background_test.jpg' in 'D:\webprojects\gs-portfolio\src\components\pages' @ ./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-44c827be!./~/sass-loader/lib/loader.js!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/components/pages/Home.vue 6:73-119
This is my folder structure:
assets
-images
--background_test.jpg
-styles
--main.scss
I didn't changed my webpack config file, I'm very in webpack.
The text was updated successfully, but these errors were encountered: