3

I currently want to install node-sass in a project but every time I get this error

error: unable to rename temporary 'Release / obj.target / libsass / src / libsass / src / color_maps-5ff12a01.o.tmp' to output file 'Release / obj.target / libsass / src / libsass / src / color_maps.o ':' Operation not permitted ' 2 warnings and 1 error generated. make: *** [Release / obj.target / libsass / src / libsass / src / color_maps.o] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/{$HOME}/Workspace/bo/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js: 376: 20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal / child_process.js: 277: 12) gyp ERR! System Darwin 21.1.0 gyp ERR! command "/Users/{$HOME}/.nvm/versions/node/v14.17.0/bin/node" "/Users/{$HOME}/Workspace/bo/node_modules/node-gyp/bin/node-gyp.js" "rebuild" " --verbose "" --libsass_ext = "" --libsass_cflags = "" --libsass_ldflags = "" --libsass_library = " gyp ERR! cwd / Users / {$HOME} / Workspace / bo / node_modules / node-sass gyp ERR! node -v v14.17.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Build failed with error code: 1

  • My node version is: v14.17.0
  • npm version: 6.14.13
  • node-sass version: "^4.14.1", (this is what i have in package.json)
  • OS platform: MACOS Monterey Chip M1

Please someone would have an idea of ​​this error, I tried to clean the cache with npm cache clean --force, to reinstall the version of node with nvm but I still have the same error

nkweb
  • 163
  • 1
  • 12

1 Answers1

1

Give up node-sass and use sass instead. It is almost totally compatible (details here: https://www.npmjs.com/package/sass) and it was the only thing that allowed me to resume work on my project after changing to a M1 computer.

yarn remove node-sass

yarn add sass

Related: Gulp-sass officially recommends to exchange those dependencies - https://github.com/dlmanning/gulp-sass/issues/803