question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot make includePath option working fine

See original GitHub issue

Hi !

I’m getting this when launching my webpack dev server:

ERROR in ./~/css-loader!./~/sass-loader/lib/loader.js!./src/page/LoginPage/styles.scss
Module build failed: 
@import 'boxes';
^
      File to import not found or unreadable: boxes.
Parent style sheet: stdin
      in /Users/thomasfetiveau/wksp/my-ptoject/src/page/LoginPage/styles.scss (line 1, column 1)
 @ ./src/page/LoginPage/styles.scss 4:14-130
webpack: bundle is now VALID.

And here is my conf:

var path = require('path');

module.exports = {
	entry: './src/index-web.js',
	output: {
		path: './app',
		filename: 'index.js'
	},
	devServer: {
		inline: true,
		port: 8080,
		historyApiFallback: true,
	},
	module: {
		loaders: [
			{
				test: /\.js$/,
				exclude: /node_modules/,
				loader: 'babel',
				query: {
					presets: ['es2015', 'react']
				}
			},
			{
				test: /\.json$/,
				exclude: /node_modules/,
				loader: 'json'
			},
			{
                test: /\.scss$/,
                loaders: [ 'style', 'css', 'sass' ],
            }
		]
	},
    sassLoader: {
        includePaths: [
        	path.resolve(__dirname, 'app/styles')
        ]
    },
}

Where did I make a mistake ?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
alexander-akaitcommented, Aug 23, 2017

@katiasmet please create new issue for this, don’t write your problem(s) inside other problem(s), thanks!

1reaction
zabojadcommented, Mar 20, 2017

I’ve just succeeded in making it work with inline loader configuration (+ webpack 1 config style):

module: {
		loaders: [
			{
				test: /\.js$/,
				exclude: /node_modules/,
				loader: 'babel',
				query: {
					presets: ['es2015', 'react']
				}
			},
			{
				test: /\.json$/,
				exclude: /node_modules/,
				loader: 'json'
			},
			{
                test: /\.scss$/,
                loaders: [ "style-loader", "css-loader?sourceMap", 'sass-loader?{"sourceMap":true,"includePaths":["app/styles"]}' ],
            }
		],
	},

Why the hell the “modern” way to do this doesn’t work ? ie, with the rules node?

Read more comments on GitHub >

github_iconTop Results From Across the Web

VSCode not recognizing includes from includepath
Your compiler doesn't now know about the include path's you set in Visual ... this when i started to use Visual Studio Code...
Read more >
How to Fix Include Path Error in C/C++ Files using ... - YouTube
Your browser can't play this video. Learn more. Switch camera.
Read more >
Include Path Error in VS code while running c cpp codes
... #include_in_c_cppHeaders path not found error, Change Include path setting error in VS code, ... Your browser can't play this video.
Read more >
Default include path being overridden when it did not used to be
THE CURRENT SITUATION: Intellisense seems to work fine when I set Properties > General > Platform Toolset to GCC for Windows Subsystem for...
Read more >
CLion fails to find some of my headers. Where does it search ...
So, actions like `make all` and such work fine. ... If CLion was kind enough to offer Show Compiler Info option anywhere, I'd...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found