0

I was trying to run the gulp command in the windows command promptafter installing node_modules in my laravel installation but it came back with this error in my windows command prompt :-

'gulp' is not recognized as an internal or external command, operable program or batch file. I was trying to use Lavarel Elixir and as in the Laracast videos I was trying to get the gulp command working on my command prompt but it shows

I installed node_modules using the below command

npm install --no-bin-links

it installed all the files

I am using Netbeans as my IDE and it is showing an error in the node_modules folder also , so I am unsure as to how to get this fixed and Working

enter image description here

My Work Environment is Apache through MAMP OS :- Windows 10 IDE :- Netbeans

Thanking you in anticipation

enter image description here

1 Answer 1

1

In order to be able to run gulp you need to install the gulp command line interface globally like so: npm install -g gulp-cli. Afterwards you need to add a gulpfile.js where you would configure your builds/tasks. For more information check out the official "Getting started" guide and the docs on gulp: https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md

Sign up to request clarification or add additional context in comments.

7 Comments

Laravel has a file named gulpfile.js inbuilt so do I still need to add the file and from where in the system should I run the command line ? From the current project folder or the system 32 folder and should i run this in cmd as administrator?
After you run npm install -g gulp-cli this will install the gulp command line interface in a place where it is globally accessible. After installing it you should run open a command prompt, navigate to the folder where your gulpfile.js is located and run gulp from there.
i tried that but I am getting the error which I have updated now in my question ..
This means that the dependencies, defined in the package.json file have not been installed. I guess they are located in the same folder as the the gulpfile. To install those dependencies you need to run npm install and a new node_modules folder will be created where they will be installed.
yes that is created but with some errors as I showed in the screenshot in the question but still the gulp command does not work
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.