1

Just built a brand new Angular App with SASS but when trying to write sass I get the following error

Module build failed (from ./node_modules/sass-loader/lib/loader.js).

This is what I'm running on - Angular-Cli: 8.2.0, Node: 10.16.2, NPM: 6.9.0

I've tried adding a webpack config file in the attempt to try out a solution from a similar issue but instead in a react app.

module: {
    rules: [
        {
            test: /.(ts|tsx)?$/,
            use: [
                MiniCssExtractPlugin.loader,
                    {
                        loader: "css-loader",
                        options: {
                            minimize: true,
                            sourceMap: true
                        }
                    },
                    {
                        loader: "sass-loader"
                    }
            ],
            loader: 'ts-loader',
            enter code hereinclude: [path.resolve(__dirname, 'src')],
            exclude: [/node_modules/]
        }
    ]
}

I would like to just be able to write SASS within the angular framework.

1
  • npm rebuild node-sass Commented Aug 9, 2019 at 7:15

2 Answers 2

3

Trying using the below commands

sudo npm rebuild node-sass

sudo npm install --save-dev  --unsafe-perm node-sass
Sign up to request clarification or add additional context in comments.

2 Comments

using angular 8 (system) 7 (local project) and it works like charm
npm install --save-dev --unsafe-perm node-sass work in my case , on first command i was getting python error
0

I was simply trying to write scss when having the .sass ext. Easy fix knowing now what I was doing wrong.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.