Cannot find any of modules: node-sass, sass

Bug fix (plugin svelte) Error: Cannot find any of modules: node-sass, sass with the command that appears during compilation npm run build

Errors

[!] (plugin svelte) Error: Cannot find any of modules: node-sass, sass
templates / App.svelte
Error: Cannot find any of modules: node-sass, sass
at Object.importAny (app / templates / svelte / node_modules / svelte-preprocess / dist / modules / importAny.js: 1: 873)
at Object.transformer [as scss] (app / templates / svelte / node_modules / svelte-preprocess / dist / transformers / scss.js: 1: 510)
at app / templates / svelte / node_modules / svelte-preprocess / dist / autoProcess.js: 1: 1513
at style (app / templates / svelte / node_modules / svelte-preprocess / dist / autoProcess.js: 1: 2924)
at app / templates / svelte / node_modules / svelte / src / compiler / preprocess / index.ts: 122: 34
at async Promise.all (index 0)
at replace_async (app / templates / svelte / node_modules / svelte / src / compiler / preprocess / index.ts: 60: 48)
at preprocess (app / templates / svelte / node_modules / svelte / src / compiler / preprocess / index.ts: 115: 12)
at async Promise.all (index 0)
at async Promise.all (index 0

22 verbose stack error: command failed
22 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
22 verbose stack at ChildProcess.emit (node: events: 376: 20)
22 verbose stack at maybeClose (node: internal / child_process: 1063: 16)
22 verbose stack at Process.ChildProcess._handle.onexit (node: internal / child_process: 295: 5)
23 verbose pkgid app@1.0.0
24 verbose cwd / app / templates / svelte
25 verbose Darwin 20.2.0
26 verbose argv “/usr/local/Cellar/node/15.4.0/bin/node” “/ usr / local / bin / npm” “run” “build”
27 verbose node v15.4.0
28 verbose npm v7.0.15
29 error code 1
30 error path / app / templates / svelte
31 error command failed
32 error command sh -c rollup -c
33 verbose exit 1

Correction

Enter command

npm rebuild node-sass –force

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *