2

I'm new to react.js and building an app that uses .scss, so I'm trying to install Sass on Mac M1. I've followed this answer https://stackoverflow.com/a/68352893/18860641. When running npm install -g sass it runs with the output saying changed 18 packages, and audited 19 packages in 559ms. However, when I run sass -v afterwards it says zsh: command not found: sass.

The same issue occurs if I try to install yarn using npm with npm install --global yarn, so I assume that the issue is with npm.

I reinstalled node.js, node, npm and npx. I currently have node v16.14.2 and npm v8.5.0 which are both installed via node.js. I have macOS Monterey v12.2.1.

Why won't npm install either yarn or sass?

Mathias M
  • 21
  • 2

1 Answers1

0

To see whether your project has sass, check the package.json file. If you've installed react via create-react-app, there's a sass compiler automatically included!

To check the version of your globally installed sass, as the previous comment said, add npm to your PATH. Check out this on how to do that: npm global install does not add packages to PATH on Windows 8.1

Is there a reason why you want sass globally installed though? (Sry this should be comment but I don't have enough reputation)