So I haven't seen this answer yet, and that NODE_PATH
and all these other so-called environment variable fixes didn't do anything, so I thought I'd add my brute force way of getting this to work:
Obviously you install the latest node.js
and do npm install
. I also had to upgrade some dependencies first (was getting warnings on these when I tried to install gulp, and before I ran these commands it was telling me it was missing the popper.js
dependency Bootstrap 4 required - even though it was actually ok in that department!):
npm install -g minimatch
(Enter)
npm install -g graceful-fs
(Enter)
I saw when I did npm install -g gulp
, again, though (and it was failing to run), it was putting it in
C:\Users\myname\AppData\Roaming\npm\node_modules
So because I was running gulp
from a command line that was cd
'd to my project folder in:
C:\Users\myname\Documents\Visual Studio 2015\Projects\myproject
I doubt it knew anything about that other location. Also my package.json didn't have:
"scripts":{
"gulp": "gulp"
}
Instead, it had:
"scripts":{
"start": "gulp"
}
So it could not run gulp
, anyway, even if it had been installed to the project. I guess at this point maybe if I had ran start
instead of gulp
, it might've worked, but so I added a comma after "gulp"
and another line:
"scripts":{
"start": "gulp",
"gulp": "gulp"
}
Then I copied the gulp
folder from
C:\Users\myname\AppData\Roaming\npm\node_modules\gulp
to
C:\Users\myname\Documents\Visual Studio 2015\Projects\myproject\node_modules\gulp
and it worked fine after that.
npm install gulp --save-dev
? – Shibbolethgulp
program lies to the Windows %PATH% variable. In my case:%AppData%\Roaming\npm
– Holoenzyme