No local gulp install found even after installing npm install -g gulp
As pointed out in the doc, you should install it globally (you did that) and add it to your project dev deps (locally):
npm install gulp --save-dev
local gulp not found after installing globally and locally
Rico Kahler had the correct answer in his comment.
When I looked at the machine (instead of going off of my memory), I saw that the gulp file was one directory higher than it should have been.
The error message did have a clue toward this: it gave the directory holding the gulpfile, not the current directory.
Gulp: /usr/local/bin/gulp: No such file or directory
Do you want to install gulp locally or globally?
Locally
npm install --save-dev gulp gulp-cli
should do the trick. You can then run it using:
./node_modules/.bin/gulp
npm run gulp
if you add gulp to the scripts section ofpackage.json
.
Globally
Most likely you have a $PATH
issue.
Did you check where your global libraries are installed by NPM?
npm list -g
Does installing any other global library work, or is it specific to Gulp?
-- Edit --
If you are using NVM, you should add the NVM setup to your rcfile (that is, ~/.bashrc
, ~/.zshrc
, ~/.profile
or similar). You can do so by appending these lines to your rcfile.
[[ -s $HOME/.nvm/nvm.sh ]] && . $HOME/.nvm/nvm.sh
This will load NVM and update your PATH
so that your shell is able to find gulp
(or any other globally-installed program by npm
or yarn
).
why doesn't gulp run when installed globally?
You have to install the Gulp CLI to get the command line to work npm install -g gulp-cli
node_modules missing after local gulp install
You need either package.json
or folder named node_modules
in the current directory. If you are not going to have one, npm
will look for either one in the parent directories. Check answer to NPM Installs Package Outside Current Directory for more details.
Also it is advised to start with npm init
which will create package.json
for you.
gulp not running in Dockerfile: Local gulp not found in /
I have Gulp running in a container. The main differences are that I set a working directory:
RUN mkdir /mcvitty
WORKDIR /mcvitty
COPY . /mcvitty
I don't run npm link gulp
, either.
If that doesn't work, remove the RUN gulp
commands and add them to your docker run
command, e.g.
docker run -it --rm --entrypoint '/bin/sh' myimage -c 'gulp && gulp images'
gulp dev says Local gulp not found when its clearly installed
Found the problem. Apparently when using parallels desktop you are not able to run gulp from a shared folder, my project was running from \\Mac\Home\Documents\Git\Development\Wigo4it\GIWI\Components
. What I did was moving the project from my shared folder to my C:/
inside the windows VM. And now it works. Just had some troubles with write permissions but that is solved.
Related Topics
Mixing Static Libraries and Shared Libraries
What Is Partition Checker in Arm Secure Mode
What Are Good Linux/Unix Books for an Advancing User
Shell Script to Kill the Process Listening on Port 3000
Recursively Cat All the Files into Single File
Changing Location of Core Dump
How to Access an Environment Variable in a .Desktop File's Exec Line
Chmod - Protect Users' File Being Accessed So Only Owner Can Access
Difference Between Virtual Page and Page Frame
Minimizing Copies When Writing Large Data to a Socket
Shell Prompt That Is Based on Location in Filesystem
How to Mount a Usb Drive on Android Things
Split Files Using Tar, Gz, Zip, or Bzip2
How to Figure Out What Is Using a Linux Kernel Module
How to Capture All of My Compiler's Output to a File
How to Change All Occurrences of a Word in All Files in a Directory
Why Do I Have to Use Bash -L -C Inside My Container
Save in a Variable The Number of Seconds a Process Took to Run