0

I didn't encounter this before when developing an angular project. I used angular 2 for this project. Here is the error below when I run the command ng serve in my project dir.

chunk {chartjs.module} chartjs.module.chunk.js, chartjs.module.chunk.js.map () 13.6 kB {main} [rendered] chunk {components.module} components.module.chunk.js, components.module.chunk.js.map () 268 kB {main} [rendered] chunk {dashboard.module} dashboard.module.chunk.js, dashboard.module.chunk.js.map () 64.5 kB {main} [rendered] chunk {icons.module} icons.module.chunk.js, icons.module.chunk.js.map () 184 kB {main} [rendered] chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 5.83 kB [entry] [rendered] chunk {main} main.bundle.js, main.bundle.js.map (main) 82 kB {vendor} [initial] [rendered] chunk {pages.module} pages.module.chunk.js, pages.module.chunk.js.map () 18.5 kB {main} [rendered] chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 328 kB {inline} [initial] [rendered] chunk {scripts} scripts.bundle.js, scripts.bundle.js.map (scripts) 358 kB {inline} [initial] [rendered] chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 10.5 kB {inline} [initial] [rendered] chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 3.53 MB [initial] [rendered] chunk {widgets.module} widgets.module.chunk.js, widgets.module.chunk.js.map () 58.5 kB {main} [rendered]

ERROR in ./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader?{"ident":"postcss"}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":[]}!./src/scss/style.scss Module build failed: Error: ENOENT: no such file or directory, scandir '/home/jayzdevera/Documents/ad-fingerprinting/web/node_modules/node-sass/vendor' at Error (native) at Object.fs.readdirSync (fs.js:952:18) at Object.getInstalledBinaries (/home/jayzdevera/Documents/ad-fingerprinting/web/node_modules/node-sass/lib/extensions.js:124:13) at foundBinariesList (/home/jayzdevera/Documents/ad-fingerprinting/web/node_modules/node-sass/lib/errors.js:20:15) at foundBinaries (/home/jayzdevera/Documents/ad-fingerprinting/web/node_modules/node-sass/lib/errors.js:15:5) at Object.module.exports.missingBinary (/home/jayzdevera/Documents/ad-fingerprinting/web/node_modules/node-sass/lib/errors.js:45:5) at module.exports (/home/jayzdevera/Documents/ad-fingerprinting/web/node_modules/node-sass/lib/binding.js:15:30) at Object. (/home/jayzdevera/Documents/ad-fingerprinting/web/node_modules/node-sass/lib/index.js:14:35) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/home/jayzdevera/Documents/ad-fingerprinting/web/node_modules/sass-loader/lib/loader.js:3:14) @ ./src/scss/style.scss 4:14-195 @ multi ./src/scss/style.scss

webpack: Failed to compile.

My node v is 8.4.0

Would appreciate if someone can help. Thanks in advance.

2
  • 1
    try deleting the node_modules directory and reinstall everything Commented Sep 12, 2017 at 9:02
  • I tried that already. But it didn't workout. Commented Sep 13, 2017 at 1:29

2 Answers 2

0
Try including the built version of chart.js:

"scripts": ["../node_modules/chart.js/dist/Chart.bundle.min.js"],

or you need to add the path to your .angular-cli.json like this:
    "apps": [

        "scripts": [

            "../node_modules/chart.js/src/chart.js",

        ],

    ]
Sign up to request clarification or add additional context in comments.

Comments

0

I found out the solution to this problem my self. The link is below for having the same error with me. https://github.com/JeffreyWay/laravel-mix/issues/226

Just run the npm install node-sass

If there is an issue running the npm install node sass then run this command.

npm install node-sass --no-bin-links

It solved my problem.

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.