Unable to install watchify package - node.js

I am trying to install watchify package via npm but I am failing. After a little while the command just stops its execution. Any idea on how to fix this issue? Thx
npm install --save watchify#2.4.0
npm WARN package.json thumbnail-gulp#1.0.0 No description
npm WARN package.json thumbnail-gulp#1.0.0 No repository field.
npm WARN package.json thumbnail-gulp#1.0.0 No README data
> fsevents#0.3.8 install /Users/sandropalmieri/Documents/mycode/reactjs/thumbnail-gulp/node_modules/watchify/node_modules/chokidar/node_modules/fsevents
> node-gyp rebuild

Related

Why am I getting an error when trying to install and run npm?

I am trying to install and run npm in a linux environment. I have executed the below code to try and achieve this
nvm install v11.0.0
nvm use v11.0.0
npm install
npm start
When I execute npm install in the command line I keep getting the following error message. Any advice to help this run is much appreciated.
npm WARN saveError ENOENT: no such file or directory, open '/home/andrewoca/PycharmProjects/pythonProject/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/andrewoca/PycharmProjects/pythonProject/package.json'
npm WARN pythonProject No description
npm WARN pythonProject No repository field.
npm WARN pythonProject No README data
npm WARN pythonProject No license field.
npm install is looking for package.json in order to see what it needs to do. Since you dont have it - you get the errors.
See https://docs.npmjs.com/cli/v7/commands/npm-install
Before running npm install, create an npm project.
This can be done with npm init -y
Now you can use npm install <package name>

NPM Insall error (Angular 6)

I have an Angular 6 project and when I try to execute it, it throws the following error:
Could not find module "#angular-devkit/build-angular" from "C:\\Users\\fernando.cavalcante\\Desktop\\Fernando_Backup\\VisualStudio2017\\Projects\\GerenciadorDiretorioAPI\\Presentattion".
Error: Could not find module "#angular-devkit/build-angular" from ...
I tried to update the packages but when I run npm install command, cmd throws the following message:
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\me\Desktop\Folder1\Projects\My.Project\Developing\0 - Presentation\My.Project\node_modules\.staging\es5-ext-b75d419b\test\reg-exp\#\sticky\is-implemented.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 403 Forbidden: fsevents#https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz
npm ERR! code EINTEGRITY
npm ERR! sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q= integrity checksum failed when using sha1: wanted sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q= but got sha1-pMeCeEFUzmIX1LXY6ZTg7bwjcDY=. (4472399 bytes)
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\me\AppData\Roaming\npm-cache\_logs\2018-05-18T13_11_28_030Z-debug.log
I searched some solutions here, here, here and here, tried to reinstall Node, reinstall Angular and even searched in some unresolved questions but nothing worked for me.
I also tried this solution and run npm clean cache -f but didn't work.
I don't know how to proceed.
I'm using Angular CLI: 6.0.1 and Node: 8.11.2
Delete package-lock.json, even with #angular/cli # version 7, I'm using version 6, and was having the same issue. Deleting the package-lock.json fixed this error for me. There was no need to delete node_modules as it would not even install any packages, but only throw errors.
Delete your node_modules folder. rm -rf node_modules
Delete your package.lock.json file.
Might want to update your angular cli.
npm install -g #angular/cli#latest
or first run npm uninstall -g #angular/cli then npm install -g #angular/cli#latest
Now run npm install.
Install dev dependency.
npm install --save-dev #angular-devkit/build-angular
Is a new package in Angular 6

Local grunt installation gives error

npm install -g grunt-cli //done successfully
npm install grunt --save --only=dev
gives following error
(node:11000) fs: re-evaluating native module sources is not supported. If
you are using the graceful
-fs module, please update it to a more recent version.
npm WARN prefer global coffee-script#1.10.0 should be installed with -g
project#1.0.0 C:\Users\Live\Desktop\node grunt\final
`-- (empty)
npm WARN project#1.0.0 No repository field.
npm ERR! code 1
Tried uninstalling grunt-cli, cleaning npm cache, then re-installing, but still the problem persists.
Ok short recap:
When in doubt remove your node_modules and install all packages again using npm install
If that didn't work, try updating your npm by executing npm update -g npm and redo step 1.
If that didn't solve your problem, try upgrading to another NodeJS version using nvm or n.

Error when upgrading Node.js via npm

Following the instructions at http://davidwalsh.name/upgrade-nodejs, to upgrade Node.js on a RedHat Fedora 16 server, I get the error...
cp: cannot overwrite directory `/usr/local/bin/node' with non-directory
... and the version of node remains unchanged.
node --version
v0.10.12
# sudo npm cache clean -f
npm WARN using --force I sure hope you know what you are doing.
# sudo npm install -g n
npm http GET https://registry.npmjs.org/n
npm http 200 https://registry.npmjs.org/n
npm http GET https://registry.npmjs.org/n/-/n-2.0.2.tgz
npm http 200 https://registry.npmjs.org/n/-/n-2.0.2.tgz
/usr/bin/n -> /usr/lib/node_modules/n/bin/n
npm WARN package.json fresh#0.1.0 No repository field.
npm WARN package.json methods#0.0.1 No repository field.
npm WARN package.json range-parser#0.0.4 No repository field.
npm WARN package.json send#0.1.0 No repository field.
npm WARN package.json cookie-signature#1.0.1 No repository field.
npm WARN package.json bytes#0.2.0 No repository field.
npm WARN package.json pause#0.0.1 No repository field.
npm WARN package.json eyes#0.1.8 No repository field.
npm WARN package.json eventemitter2#0.4.11 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
n#2.0.2 /usr/lib/node_modules/n
# sudo n stable
install : node-v0.12.7
mkdir : /usr/local/n/versions/node/0.12.7
fetch : https://nodejs.org/dist/v0.12.7/node-v0.12.7-linux-x64.tar.gz
cp: cannot overwrite directory `/usr/local/bin/node' with non-directory
installed : v0.10.12
This is just on a test server, so there is no danger of disrupting the existing node service. What would be a simple way to get node to upgrade to 0.12.7?
EDIT: My solution was to rename /usr/local/bin/node then run taaem's node-install.sh script. When Node.js 0.12.7 was successfully installed, I could delete the original (renamed) directory.
Run the following commands which will upgrade the node version.
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
The n package represents a Node helper, and running the last command upgrades node to the latest stable version.
Once your install is complete, you can confirm you version with another command
sudo n 0.8.21

npm ERR! cb<> never called! - browserSync

I'm new to grunt and am hitting a wall with BrowserSync. Whether I try to install it globally or for a particular folder
npm install -g grunt-browser-sync
Or
npm install grunt-browser-sync --save-dev
I get the same error: npm ERR! cb<> never called! I've tried npm cache clear and deleting the node_modules folder and runing npm install again but nothing seems to help.
Watch, Compass, and Uglify are all working. I just can't get browserSync to install successfully.
Here is a copy/paste of commands I just entered and the results.
D:\xampp\htdocs\testing>npm install grunt-browser-sync --save-dev
npm WARN package.json testing#1.0.0 No repository field.
npm WARN package.json testing#1.0.0 No README data
npm WARN unmet dependency D:\xampp\htdocs\testing\node_modules\socket.io\node_mo
dules\engine.io requires debug#'1.0.3' but will load
npm WARN unmet dependency D:\xampp\htdocs\testing\node_modules\socket.io\node_mo
dules\debug,
npm WARN unmet dependency which is version 0.7.4
grunt-browser-sync#1.5.3 node_modules\grunt-browser-sync
└── browser-sync#1.9.0 (emitter-steward#0.0.1, easy-extender#2.2.0, opt-merger#1
.1.0, commander#2.6.0, opn#1.0.1, object-path#0.8.1, minimist#1.1.0, eazy-logger
#2.1.0, ua-parser-js#0.7.3, browser-sync-client#1.0.1, lodash#2.4.1, dev-ip#0.1.
7, portscanner-plus#0.2.0, connect#3.3.4, serve-index#1.6.0, tfunk#3.0.0, serve-
static#1.8.0, glob-watcher#0.0.7, localtunnel#1.5.0, resp-modifier#1.0.1, foxy#7
.1.0)
D:\xampp\htdocs\testing>grunt browserSync
Running "browserSync:bsFiles" (browserSync) task
Warning: Cannot find module 'base64id' Use --force to continue.
Aborted due to warnings.
D:\xampp\htdocs\testing>
Please advise.
following sskips suggestion below I got the following error:
D:\xampp\htdocs\testing>npm install base64id
npm WARN package.json testing#1.0.0 No repository field.
npm WARN package.json testing#1.0.0 No README data
npm WARN unmet dependency D:\xampp\htdocs\testing\node_modules\socket.io\node_mo
dules\engine.io requires debug#'1.0.3' but will load
npm WARN unmet dependency D:\xampp\htdocs\testing\node_modules\socket.io\node_mo
dules\debug,
npm WARN unmet dependency which is version 0.7.4
base64id#0.1.0 node_modules\base64id
D:\xampp\htdocs\testing>
you lose something.
install base64id as below, then try again
npm install base64id

Resources