Why SCSS compile error in atom? - sass

I need help! I installed sass-autocompile in Atom. Created .scss file. But I have error when I want to compile it.

The problem is that node-sass is not installed in your system, you need to install (globally, so any application or command line execution could reference it without the full path to the binary file) it by running the following command:
npm install -g node-sass
Read more about installing node packages globally here.
Hope it helps.

Try to install node-sass globally. npm node sass
Install:
$ npm install -g node-sass
Check in command line:
$ node-sass -v

Related

Error:Unable to install composer-cli

When I run npm install -g composer-cli I get this error:
"Need to have composer-cli installed at v0.15 or greater".
How can I resolve that?
Try running the command with --unsafe-perms , like this:
sudo npm install --unsafe-perm -g composer-cli
Reference: https://github.com/nodejs/node-gyp/issues/454
On Ubuntu (the supported Linux development environment) we do not recommend using sudo to install Composer.
The usual reason people would resort to sudo is a permission problem, but it is better to resolve the permission problem rather than use sudo. Often the problem is the npm prefix which can get set to /usr/local to which the user doesn't have write access. Issuing an npm config set prefix /home/<myuser>/ will solve the problem.
You may have an old version of Composer or one of the components installed. Try using npm ls -g --depth=0 to see if you have some composer code already installed, and if so remove it with npm uninstall -g composer-<component> where might be cli, or playground etc. The retry the install-g command.
Try this....this is the command to install 0.20 version.
npm install -g composer-cli#0.20
I changed my node version from
11
to
8.8.15
and did npm install -g composer-cli.It worked for me .
You need to use a 8.* node version,
My solution was:
nvm install 8.9.0
nvm use 8.9.0
npm install -g composer-cli

bangular: Error: `libsass` bindings not found. Try reinstalling `node-sass`?

I'm getting this error while doing gulp build task after installing "bangular" project (yo bangular).
Error: libsass bindings not found. Try reinstalling node-sass?
seems like this is because of the latest node, python versions
To resolve this:
I have pointed the environment variable PYTHON to python27 binary
npm uninstall node-sass
npm install node-sass#latest
npm uninstall gulp-sass
npm install gulp-sass#latest
also, deleted global node-gyp module (from /nodejs/node_modules/npm/node_modules/ dir) and re-installed (npm install -g node-gyp#latest).

error: -bash: grunt: command not found

bit of a macosx noob , trying to install grunt on my machine. I tried:
npm install grunt
It look like the files are downloaded properly but still getting the error.
When I do echo $PATH it does not look that the path is pointing to grunt. Do I have to install it from a certain directory? How can I fix this?
Edit
After I run :
npm install -g grunt-cli
This happens:
You have to do sudo npm install -g grunt-cli, then you can use grunt in your terminal

Command error running installed npm modules

Hi guys could you help me? i've installed the latest version of node.js and installed cordova and ionic framework the problem starts is when i'm trying to run the ionic command, the console throw me the following message:
MacBook-Pro-de-Diego:~ diegochavez$ ionic start myApp
-bash: ionic: command not found
So then i looked for the root of my npm modules
MacBook-Pro-de-Diego:~ diegochavez$ npm root
/Users/diegochavez/node_modules
if you guys know something to fix this? Thanks in advance
First check if ionic is installed at path like /usr/local/lib/node_modules/ionic/bin/ionic. If it is there, you need to check the npm default global path.
Run command npm config get prefix to check the default path, it should be /usr/local. If it is not /usr/local, run command npm config set prefix /usr/local to set it. And then install again. Also see this answer
I having issue while running - sudo npm install -g gulp ionic with below version of node installed
node -v v0.10.15
npm -v 1.3.5
Error went way after I update node to latest version v0.10.26
The error you are getting is because ionic was not installed successfully. Trying updating node and run command as mentioned sudo npm install -g gulp ionic
Check where your npm folder is located. If your npm folder is located in $Home..then type this:
export PATH="$HOME/npm/bin:$PATH"
You need to run sudo npm install -g ionic from the command line.

Why does Grunt not add itself to the shell?

I have a problem installing grunt. All the documentation, and blog post tutorials, say that running:
npm install -g grunt
will then allow you to run grunt commands from the terminal.
I have a situation where grunt appears to install with no errors, but typing the command grunt in the terminal still gives:
-bash: grunt: command not found
What could I be doing wrong? And where could I find grunt to add it to my BASH profile manually?
Since Grunt version 0.4 (which was released 1 or 2 weeks ago) you need to install the grunt command line tool globally (if needed, use sudo before the command):
npm install -g grunt-cli
In your project location you then install the latest grunt version:
npm install grunt --save-dev
Option --save-dev will save the npm config in your package.json file, which makes it easier to install or reinstall the dependencies (using just npm install).
Try running the install with the verbose flag:
npm install -g grunt --verbose
You can see where it is being installed (something like /usr/local/share/npm/bin/grunt). Then check your path:
echo $PATH
If the path does not contain the install bin location, modify the path in your bash profile to include the location of the bin directory, then try grunt again in a fresh terminal.
UPDATE: Grunt 0.4 altered installation process. For 0.4 installs, see answer from asgoth below.
It seems that grunt in the current version 0.4.0 does not install a bin command. The last 0.3.x version is 0.3.17, which supports a bin command. To run grunt from the command line, you will want to install the grunt command line grunt-cli:
npm install -g grunt-cli --verbose
I had installed node using Homebrew and this was my solution:
set config for -g (GLOBAL) install directory directory: npm config
set prefix /Users/YOURNAME/.node/
make sure to edit PATH: sudo nano ~/.profile
add to path: export PATH=“/Users/YOURNAME/.node/bin:”$PATH
then update source: source ~/.profile
Following these steps will allow any packages installed using npm install -g somePKG to be placed in the correct location regardless of your current working directory. And by updating your $PATH correctly command line functions will work.
Information based on:
Fixing npm permissions - bit.ly/1CmIyqx

Resources