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

Module build failed: Error: Something wrong with provided resources. Make sure 'options.resources' is String or Array of Strings. #38

Closed
IAMtheIAM opened this issue Jul 7, 2017 · 6 comments

Comments

@IAMtheIAM
Copy link

@IAMtheIAM IAMtheIAM commented Jul 7, 2017

The plugin throws error with webpack 3.1.0

                  {
                     loader: 'sass-resources-loader',
                     options: {
                        resources: ['./src/assets/styles/variables.scss', './src/assets/styles/mixins.scss'],
                     }
                  },

Module build failed: Error: 
      Something wrong with provided resources.
      Make sure 'options.resources' is String or Array of Strings.

Upon debugging webpack, it appears sass-resources-loader\lib\utils\parseResources.js line 34 is returning blank. Glob.sync is not returning the absolute path. So in sass-resources-loader\lib\loader.js line 54, var resourcesLocations is set to empty

@Maushundb

This comment has been minimized.

Copy link

@Maushundb Maushundb commented Jul 8, 2017

Getting the same with Webpack 2.6

@IAMtheIAM

This comment has been minimized.

Copy link
Author

@IAMtheIAM IAMtheIAM commented Jul 26, 2017

More at this issue 40

@alexfedoseev

This comment has been minimized.

Copy link
Member

@alexfedoseev alexfedoseev commented Oct 23, 2017

I believe this can be closed. 1.3.1 and few notes added in f3d2cf6 should resolve these issues.

@aFcFzF

This comment has been minimized.

Copy link

@aFcFzF aFcFzF commented Sep 7, 2018

resources: ['./src/assets/styles/variables.scss', './src/assets/styles/mixins.scss'],

the path in options.resources must be a absolute path, eg:
resources: [path.resolve(__dirname, './src/assets/styles/variables.scss')]

path.resolve is needed,good lucky!

@pangz1

This comment has been minimized.

Copy link

@pangz1 pangz1 commented Jan 31, 2020

resources: ['./src/assets/styles/variables.scss', './src/assets/styles/mixins.scss'],

the path in options.resources must be a absolute path, eg:
resources: [path.resolve(__dirname, './src/assets/styles/variables.scss')]

path.resolve is needed,good lucky!

using absolute path still get the error

@justin808

This comment has been minimized.

Copy link
Member

@justin808 justin808 commented Feb 2, 2020

@pangz1 any chance that you can dig into this. If a PR is needed, I'll review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.