I installed the Grunt cli with the following command?
npm install -g grunt-cli
Then I created the package.json and the Grunfile.js and run
npm install -S grunt
But grunt is not known by Windows. It says "´grunt´ is not recognized as an internal or external command".
Typing path on console, doesn't show Grunt, and where grunt also fails.
Did everything as Administrator on a Windows 8 machine.
What is wrong with this installation?
obs: and where is it installed?
Related
I install nodemon from npm in project but cant run js file with 'nodemon run start' and facing this error:
nodemon : The term 'nodemon' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
You need to install nodemon globally using the -g option.
npm install -g nodemon
This will add nodemon to your PATH environment variable so that your terminal knows where the executable file for nodemon is.
Otherwise your terminal doesn't know which executable you're trying to run.
Your second option is to run it through npx.
Use the following:
npx nodemon {filename}
npm will handle locating and running the executable for you. The npx command is installed on your computer by default when you install npm.
You will need to install nodemon if you haven't already
for dev environment run
$ npm install --save-dev
to install nodemon globally run
npm install -g nodemon
to run your app/server use
nodemon app
If the name of your entry file is not app use its name in the command
nodemon {filename}
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.
For some reason, when i type gulp in the terminal, my gulp modules can't be found.
All of the commands node -v, gulp -v and npm -v work fine and i have the latest versions.
I ran this commands but it still won't work.
npm uninstall -g gulp
npm install -g gulp
rm -rf node_modules
npm install
This is my project, https://github.com/DannyS95/Project
I also tried to run the same project on my windows volume and the gulp command works fine, it just won't work on ubuntu, i am dual booting.
Do not commit node_modules/ unless you have need.
The error message says you do not have gulp-plumber installed. If you look in your package.json, there does not exist a package named gulp-plumber, so install it.
I have a project which I will have to deploy to client Windows systems where it will not be possible to connect to internet. I currently have a folder in D:\NODE which contains node.exe and npm.cmd and a node_modules folder. To be able to run node from command line I have added D:\NODE to PATH variable.
I can have most of the modules installed locally inside node_modules of my project. However there's one - node-windows - which needs to be installed globally to work.
Following suggestion below I went to node-windows (installed globally) and packaged it up (npm pack), which created a tarball. I have then copied that file with my project and tried to install it on the test machine globally like this: npm install -g node-windows-0.1.5.tgz
I can see that it got installed in the global directory. However when I try to run the command which uses this module it complains that it cannot find it: Error: Cannot find module 'node-windows'
When I list the modules (npm list -g) it is clearly there in the list...
What do you think? And thank you.
You can install packages on a system without internet connection by packing them using built-in functionality in npm. This way, the node modules will be installed properly.
Create a package.json.
In your package.json, list all the modules you need under bundledDependencies (docs on npm).
Run npm install to install your node files before packing.
Create a tarball with npm pack.
Copy the tarball over to the machine without internet connection.
Install the modules with npm install <filename>.
Update
Regarding your comments, it looks like your globally installed node modules isn't found.
Try using the npm link command (docs on npm link):
cd yourAppFolder
npm link node-windows
1 - In system with internet access install module with this command:
npm install [module name]
2 - go to %userprofile%\AppData\Roaming\npm\node_modules[module name]\
(e.g C:\Users\janson\AppData\Roaming\npm\node_modules\grunt-cli)
3 - run npm pack
4 - this should result in a [module name]-x.y.z.tgz file
5 - run npm i -g [module name]-x.y.z.tgz in offline system
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.