I'm using Gulp for my project. I used the path C:\Users\senthil\Desktop\angular for installing gulp. But it got installed on C:\Users\senthil. So I copied the folder and pasted it in my desired path, with gulp.js file. Once I run the command gulp, it shows an error
gulp is not recognized as an internal or external command,operable
program or bath file
Do copy, paste of node_modules is wrong?
You should change the current working directory using cd command to your node project. Install node modules there.
Gulp module should be installed globally. Use the following command to do so:
npm install -g gulp
Now gulp command will be available anywhere in command prompt
Related
I am using yarn v1.6.0 as a dependency manager, I have installed live-server globally by using the following command:
yarn global-add live-server
But when executed it like live server, it is giving the following error:
'live-server' is not recognized as an internal or external command,
operable program or batch file.
It is obvious my path is not configured Can some help which path should I use an environment variable?
I tried to see my version of live-server but got this error,You can use
npm install -g live-server
in your npm command line
All the packages you download from yarn gets stored in bin folder inside yarn directory. So, you have to set the path of the bin folder of your yarn in PATH environment variable as you might have did with the bin directory of the npm.
1). The following path would get you to the bin folder in Windows machine then set this path to the PATH environment variable.
C:\Users\Username\AppData\Local\Yarn\bin
2). For macOS do the following
$ export PATH=$PATH:/home/user/.yarn/bin/
Copy the path of the bin of the yarn.
C:\Users\USER NAME\AppData\Local\Yarn\bin
Go to the Environment variables.
Select, path -> new -> paste the copied path.
Reopen the cmd and type
live-server -v
I am unable to run gulp. I have install gulp globally using sudo since I'm running on OS X EL Capitan. In my project under the folder node_modules I am able to see the gulp folder. However when I run on terminal gulp the output is -bash: gulp: command not found I don't seem to find the issue. Here is an image showing the commands to install Gulp and the output.
I tried to uninstall gulp globally by running npm uninstall -g gulp but I get the following errors.
I am trying to install GULP but can not get it to install the files in a local directory. I have successfully installed Node.js and opened the NodeJS Command Promt. Next I entered the below line to install GULP on my machine. It fetched a load of files so did run succesfully.
npm install --global gulp
Then I created a folder on my desktop to which I created a new packages.js file in here to. Next I navigated to this folder with my NodeJS Command Prompt by entering the following;
cd {Then the path to my folder]
Next I enter
$ npm install gulp --save-dev
This then fetches a load of files (GET etc) but when I look in my folder I have nothing? There's no node_modules folder and an npm-debug.log file or anything? Any help welcome.
Instead of npm install --save-dev gulp (from one tutorial) or npm install --save-dev gulp-install (from another tutorial), none of which created any gulp related files in my project folder, I used npm install gulp and it worked.
Wonder if someone can tell me if im doing something wrong?
Downloaded Node from there website
Installed Gulp globally (npm install --global gulp)
Made a folder and inside ran (npm init) which makes the package.json file
Installed gulp to the project (npm install --save-dev gulp)
This then adds gulp as a dependency inside package.json and creates a node_modules folder.
I was expecting to only see a gulp folder inside node_modules folder like so:
| node_modules
|-- gulp
But for some reason it's adding around 132 extra dependency folders, is this correct, should this happen? I would of thought these should be contained inside the gulp folder itself?
Im using a Mac, Node v5.2.0, NPM v3.3.12, Gulp v3.9.0
npm since v3 puts almost all dependencies to the node_modules directly.
Your dependencies will now be installed maximally flat. Insofar as is possible, all of your dependencies, and their dependencies, and THEIR dependencies will be installed in your project's node_modules folder with no nesting. You'll only see modules nested underneath one another when two (or more) modules have conflicting dependencies.
References:
https://github.com/npm/npm/releases/tag/v3.0.0
I am wanting to try out the Lungo.js examples from here : https://github.com/tapquo/Lungo.js,
however the index.html in the example directory is expecting files in the components and package directories and, while those directories do exist as part of this bundle, they are empty of any files.
I have a GruntFile.coffee and a package.json and I believe that together these are some kind of make file that perhaps should make/pull/create the files that the example needs to run, but I don't know how to make them do that.
I have installed the following:
sudo npm install -g grunt-cli
sudo npm install -g grunt
sudo npm install -g coffee-script
I can now run "coffee GruntFile.coffee" successfully, but it does nothing I can see, certainly it is not creating the missing files.
And the "grunt" command simply says "Fatal error: Unable to find local grunt."
How do I tell this bundle of code that I have to get the other files I require?
And, bonus question, what's going on here?
(I understand javascript, and pulling code from github, but not these other frameworks)
package.json has devDependencies field. They need to be installed before you may use grunt command. First you need execute
npm install
in directory wich contains it.
There is definitely bug in this line of Gruntfile
You should change it to:
pkg: grunt.file.readJSON "package.json"
Then, after local grunt is installed, you may run
grunt
which will execute default task. This is well known practice last time.
You need to install grunt locally, not globally. Only grunt-cli should be installed globally.
So instead of
npm install -g grunt
Navigate to your project root folder and execute
npm install grunt
There's a getting started guide on the Grunt homepage.
The package.json file is a descriptor file for your application. More information on this file can be found in this interactive guide. You normally use grunt together with this file so you can list your grunt plugins as dependencies of your application. I suggest reading a tutorial on grunt to learn how it works.