NPM installing package ENOENT Error - javascript

I have installed npm on my Laravel Project.
When I run npm install --save vue-draggable
I get this error
ENOENT: no such file or directory, rename '/Users/victori/Desktop/project-1/node_modules/npm/node_modules/dezalgo
Although, when I run npm install -g --save vue-draggable it works. Although, id want it onto my actual project files.
NPM Verson: 5.6.0
Node: v8.9.1

Related

error when trying to install "thealtening-free" npm package

I'm trying to install an npm package but whenever I run "npm install thealtening-free" it gives me an error
log file: https://pastebin.pl/view/raw/4d036a55

-bash: ng: command not found after installing #angular/cli using npm link #angular/cli#latest

I am using:
node -v
v10.15.3
npm -v
6.4.1
I have tried below mentioned command
command: npm i -g angular/cli
Error while executing: npm ERR! /usr/local/bin/git ls-remote -h -t
ssh://git#github.com/angular/cli.git
command: npm i -g #angular/cli
npm ERR! path /Users/admin/.node_modules/bin/ng npm ERR! code EEXIST
npm ERR! Refusing to delete /Users/admin/.node_modules/bin/ng:
../lib/node_modules/angular-cli/bin/ng symlink target is not
controlled by npm
/Users/admin/.node_modules/lib/node_modules/#angular/cli npm ERR! File
exists: /Users/admin/.node_modules/bin/ng npm ERR! Move it away, and
try again.
Make sure you have the correct path in Enviroment variable -> user variable like this
In this case my npm folder are located at
C:\Users\phuc.ngo\AppData\Roaming\npm
The npm folder is where everything you install can be found like angular cli, webpack, etc...
You need to try installing angular with admin previledge and try to install it globally with -g
npm install -g #angular/cli
after installation check the angular version
ng --version

Missing access to node_modules/nan?

I'm attempting to install this project globally using npm i -g.
These are the steps:
git clone https://github.com/superflycss/cli
cd cli
npm i
npm i -g
The result is:
ole#mki:~/cli$ npm i -g
npm WARN checkPermissions Missing write access to ~/cli/node_modules/nan
npm ERR! path /home/ole/cli/node_modules/nan
Thoughts?
If I try to cd node_modules/nan there is no such directory ... so that's one thing. I'm not sure why it's trying to access that?
Deleted all the contents of my local ~/.npm-packages directory and reinstalled and now it works:
cd ~/.npm-packages
rm -fr *
cd ~/cli
npm i -g

Grunt: Fatal Error: spawn cmd ENOENT

I am trying to start Grunt on Windows, but getting an error: Fatal error: spawn cmd ENOENT. I've installed Git and NodeJS, and then ran the following:
npm install -g bower grunt-cli cordova
npm install
bower install
grunt build
grunt serve
I then tried:
clearing the cache from npm (npm cache clean)
reinstalled npm
adding C:\Windows\Systems32\; to the path variable.
But I can't get it to work.

package.json grunt dependences modules don't show up when i do a npm install

I have created a package.json file with grunt dependencies I do my npm install but the grunt modules do not show up in my website hierarchy all I get is a bunch of warn in the terminal about different plugins that I didn't want. Also I am defiantly pointing to the right folder but it says they folder don't exist
MacBook-Pro:Taylerramsay Tayler_Ramsay$ cd ~/Desktop/taylerramsay
MacBook-Pro:taylerramsay Tayler_Ramsay$ npm install
npm WARN enoent ENOENT: no such file or directory, open '/Users/Tayler_Ramsay/package.json'
npm WARN Tayler_Ramsay No description
npm WARN Tayler_Ramsay No repository field.
npm WARN Tayler_Ramsay No README data
npm WARN Tayler_Ramsay No license field.
MacBook-Pro:taylerramsay Tayler_Ramsay$
npm tells you that there is no package.json file in your directory then it can install anything.
I recommend you to follow these step :
1. run npm init to create a valid package.json file with needed information
2. Install and save your npm modules in your package.json file with --save argument. (E.g : npm install grunt-contrib-cssmin --save)

Categories