Gulp global install doesn't work on Windows 7 - windows

I am trying to install Gulp globally on a Windows 7 PC. In a command prompt I ran npm install gulp -gand it ran without any errors, although it did return the following warnings:
npm WARN install Couldn't install optional dependency: Failed to parse json
npm WARN install No data, empty input at 1:1
npm WARN install
npm WARN install ^
When I try to run gulp it says it is not recognized as an internal command.
If I check the %AppData%/npm directory, gulp.cmd is not there. Looking at all the answers to gulp command not found - error after installing gulp, I take it this is where it should be.
Any ideas what has gone wrong, or where I can look to see what has gone wrong?

When I tried to do a local install of gulp: npm install gulp, it actually showed an error:
Failed to Parse json... File:
C:\Users\username|AppData\Roaming\npm-cache\clone\1.0.2\package\package.json
When I deleted this file and retried the Global install, it then worked.

Related

trying to install sass and getting an error about the webpack

I am trying to install sass in a Vue project, I'm getting an error so I've tried to --force, even though I was able to see sass-loader in devDependencies when npm run serve I am getting an error about lang="sass", so I decided to npm uninstall sass-loader and node-sass, so I am starting again.
What should I do?
my error
wasn't to diffucult, because I am using zsh in my terminal I had to wrap in quotation
zsh: npm install -D 'sass-loader#^10' sass
and that's it

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).

npm install: WARN on dependency

I'm using npm install cmd in my TFS build. I always get the following WARN:
npm WARN optional dep failed, continuing fsevents#0.3.1
How could I delete this warning?
Are you running on Windows or Linux? If so, fsevents cannot be installed, as it is an OSX-only package.
If you run npm with --loglevel=error, you should no longer see this or any other warnings. As far as I know, there is no way to selectively suppress warnings in npm.
The flag -s / --silent works great if you want to remove all warnings and errors:
npm install --silent
npm docs
npm install --no-optional prevents this warning

Error: spawn ENOENT: missing the sass executable

I'm using bash in windows.
Getting this error when trying to run a sass compiler command via gulp.
I have Ruby & Sass installed.
Sass works fine when running it manually.
Error: spawn ENOENT: missing the sass executable. Please install sass and make available on your PATH
I have included the directory of my ruby bin in the PATH var (system variables within Enviroment variables).
Anyone got any ideas?
I had the same issue, fixed it by typing this;
sudo gem install sass
Your gulp-ruby-sass task is probably configured to execute SASS using Bundler (a gem dependency manager). When you don't have Bundler installed, that execution will fail with the error message you've quoted. Check your task configuration for the parameter "bundleExec" and make sure it's set to false, that way gulp-ruby-sass will run the SASS command directly.
A reboot didn't fix it unfortunately.
I swapped out the gulp-ruby-sass for the gulp-sass plugin and all is working fine.
It's hardly a fix but it served as a solution for me.
Instead of installing ruby-sass, I simply ran
npm i -g sass
Then replaced "sass" in gulp.js to "sass.cmd" for Windows
For my case the error was:
gulp-notify: [Error running Gulp] Error: spawn sass ENOENT
To fix it, I did the following:
In your project root:
npm install --save-dev gulp-ruby-sass
Which installed: gulp-ruby-sass#1.0.5 node_modules/gulp-ruby-sass
Then:
sudo gem install sass

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

Resources