Adonis validator package is not getting installed - node.js

When I try to run this command adonis install #adonisjs/validator it shows this error
ERROR Command failed: npm i --save #adonisjs/validator
npm WARN ajv-keywords#3.1.0 requires a peer of ajv#^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN The package standard is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Error: EPERM: operation not permitted, rename 'E:\adonisone\familybazar\node_modules\.staging\fsevents-dfd3107e\node_modules\asynckit' -> 'E:\adonisone\familybazar\node_modules\.staging\asynckit-d5ec6aa3'
npm ERR! path E:\adonisone\familybazar\node_modules\#adonisjs\generic-exceptions\node_modules\node-exceptions
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'E:\adonisone\familybazar\node_modules\#adonisjs\generic-exceptions\node_modules\node-exceptions' -> 'E:\adonisone\familybazar\node_modules\#adonisjs\generic-exceptions\node_modules\.node-exceptions.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\JOKER\AppData\Roaming\npm-cache\_logs\2018-03-06T00_37_25_769Z-debug.log
I also tried to clean the npm cache. Any idea what's wrong?

Related

npm WARN config global `--global`,`--local` are deprecated. Use `--location=global` instead. npm WARN using --force Recommended protections disabled

I am getting below error while I am trying to install npm modules using
npm install
I already have npm and node.js installed.
npm WARN config global --global, --local are deprecated. Use --location=global instead.
npm WARN using --force Recommended protections disabled.
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\test/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\test\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\test\AppData\Local\npm-cache_logs\2022-10-20T11_34_43_246Z-debug-0.log

Unable to install Netlify-Cli

i was trying to install Netlify-Cli using Linux Terminal.
I tried this command:
npm install netlify-cli -g
But it is throwing some error
> yarn#1.22.10 preinstall /usr/local/lib/node_modules/netlify-cli/node_modules/yarn
> :; (node ./preinstall.js > /dev/null 2>&1 || true)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.3.2 (node_modules/netlify-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #netlify/traffic-mesh-agent-win32-x64#0.27.10 (node_modules/netlify-cli/node_modules/#netlify/traffic-mesh-agent-win32-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #netlify/traffic-mesh-agent-win32-x64#0.27.10: wanted {"os":"win32","arch":"x64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #netlify/traffic-mesh-agent-darwin-x64#0.27.10 (node_modules/netlify-cli/node_modules/#netlify/traffic-mesh-agent-darwin-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #netlify/traffic-mesh-agent-darwin-x64#0.27.10: wanted {"os":"darwin","arch":"x64"} (current: {"os":"linux","arch":"x64"})
npm ERR! code EACCES
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/netlify-cli/bin/run
npm ERR! dest /usr/local/bin/netlify
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/netlify-cli/bin/run' -> '/usr/local/bin/netlify'
npm ERR! { [Error: EACCES: permission denied, symlink '../lib/node_modules/netlify-cli/bin/run' -> '/usr/local/bin/netlify']
npm ERR! cause:
npm ERR! { Error: EACCES: permission denied, symlink '../lib/node_modules/netlify-cli/bin/run' -> '/usr/local/bin/netlify'
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/netlify-cli/bin/run',
npm ERR! dest: '/usr/local/bin/netlify' },
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, symlink \'../lib/node_modules/netlify-cli/bin/run\' -> \'/usr/local/bin/netlify\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/netlify-cli/bin/run',
npm ERR! dest: '/usr/local/bin/netlify' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/silence/.npm/_logs/2021-05-09T13_28_21_198Z-debug.log
If any small help would be helpful.
Thanks to boirslav popov.
As he mentioned in his answer it has worked for some of them ie,
sudo npm install netlify-cli -g
But sadly it didn't work for me :(
For those, if the above command didn't work can follow the attached answer :D
Answer
I followed this answer
i.e,
sudo npm install -g --unsafe-perm=true netlify-cli
See this: https://answers.netlify.com/t/errors-with-netlify-cli/26842
Your user does not have sufficient permissions.
Im using a Mac.
So I actually had to go into my library folder and manually delete the netlify folder.
I then reinstalled the netlify cli via brew:
brew reinstall netlify-cli
This way you dont get all the permissions errors. In general this is seems like the best way to do things on mac when dealing with a cli.
It would be good to know why Mac gets mad at just using the global npm install tho.

nodemon install problem as development mode

Whenever I try to install nodemon as dev-dependency, It gives me some errors, I do not know what to do. I tried npm install nodemon --save-dev but it gives me the same errors
I disabled virus protection, run cmd as administrator, but the same problem again
PS D:\My documents\My programs\akademind\nodejs-complete-guide> npm install nodemon --save-dev
npm WARN nodejs-complete-guide#1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: EBUSY: resource busy or locked, rename 'D:\My documents\My programs\akademind\nodejs-complete-guide\node_modules\.staging\fsevents-c44863db\node_modules\abbrev' -> 'D:\My documents\My programs\akademind\nodejs-complete-guide\node_modules\.staging\abbrev-fa5cb67d'
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path D:\My documents\My programs\akademind\nodejs-complete-guide\node_modules\expand-brackets\node_modules\debug
npm ERR! dest D:\My documents\My programs\akademind\nodejs-complete-guide\node_modules\undefsafe\node_modules\debug
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename 'D:\My documents\My programs\akademind\nodejs-complete-guide\node_modules\expand-brackets\node_modules\debug' -> 'D:\My documents\My programs\akademind\nodejs-complete-guide\node_modules\undefsafe\node_modules\debug'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR!
C:\Users\Farrux\AppData\Roaming\npm-cache\_logs\2019-09-15T13_53_36_783Z-debug.log
Try to perform the following steps:
Delete package-lock.json file
Delete node_modules folder and
Install packages by running npm i.

Error while starting the backend in the node app.js in angular 6

When I am starting my backend in the angular using the node app.js command in the terminal it shows some error
I tried all the methods like npm-install or npm-install --save
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.2.7
npm WARN optional Skipping failed optional dependency /nodemon/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.2.7
npm WARN mongoose-type-url#1.0.5 requires a peer of mongoose# but none was installed.
npm ERR! Linux 4.15.0-44-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! file /home/suraj/contactly/sales-tool/salesapp/node_modules/.staging/encrypt-36282e46/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! Unexpected token 'n' at 1:3
npm ERR! { name: 'encrypt',
npm ERR! ^
npm ERR! File: /home/suraj/contactly/sales-tool/salesapp/node_modules/.staging/encrypt-36282e46/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse
npm ERR! Please include the following file with any support request:
npm ERR! /home/suraj/contactly/sales-tool/salesapp/npm-debug.log
want to fix the bug

ionic serve is not working after upgrading node.js and ionic

I upgraded node.js and npm and did an npm install and now I'm getting the message below. The thing is, I have been working on the application for about a year and gulp-sass is installed (it's what I use to upgrade my sass files) so it is clearly do to the upgrade, but I'm not sure how to get everything to work again, sort of downgrading everything again.
$ ionic serve
Uh oh! Looks like you're missing a module in your gulpfile:
Cannot find module 'gulp-sass'
Do you need to run `npm install`?
When I try npm install gulp-sass:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN enoent ENOENT: no such file or directory, open 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\gulp-minify-css\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\karma-junit-reporter\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\karma-mocha-reporter\package.json'
npm WARN rcreditsmobile#1.1.1 No repository field.
npm WARN rcreditsmobile#1.1.1 No license field.
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Users\\Public\\Programs\\nodejs\\node.exe" "C:\\Users\\Someone\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "gulp-sass" "--save"
npm ERR! node v6.9.5
npm ERR! npm v4.2.0
npm ERR! path E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\node-sass
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename
npm ERR! Error: EPERM: operation not permitted, rename 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\node-sass' -> 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\.node-sass.DELETE'
npm ERR! at moveAway (C:\Users\Someone\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:42:5)
npm ERR! at destStatted (C:\Users\Someone\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:31:7)
npm ERR! at C:\Users\Someone\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:287:18
npm ERR! at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\node-sass' -> 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\.node-sass.DELETE'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, rename 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\node-sass' -> 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\.node-sass.DELETE'
npm ERR! at moveAway (C:\Users\Someone\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:42:5)
npm ERR! at destStatted (C:\Users\Someone\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:31:7)
npm ERR! at C:\Users\Someone\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:287:18
npm ERR! at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\node-sass' -> 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\.node-sass.DELETE'
npm ERR! at Error (native) parent: 'rcreditsmobile' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Someone\AppData\Roaming\npm-cache\_logs\2017-02-11T01_17_29_643Z-debug.log
I found an answer on the ionic forum that works, the relevant part is below with a few modifications for clarity:
Just add this to your gulpfile.js
gulp.task('serve:before', ['default']);
That line tells the new ionic 2 client to run the old ionic 1.x client
'default' task before serving (before running ionic serve)
Also you need to add your ionic.config.json file this:
{
...
"app_id": "",
"v2": false,
"typescript": false,
"watch": {
"sass": ["scss/**/*.scss"],
"html": ["www/**/*.html"],
"livereload": [
"www/**/*.html",
"www/**/*.js",
"www/**/*.css"
]
}
...
}
Ref: https://forum.ionicframework.com/t/ionic2-cli-doesnt-run-gulp-tasks-on-ionic-serve/49085/7
I've encountered this problem before. What I've tried so far:
Reinstall the node.js. You may refer https://nodejs.org/en/download/
Run in command line: npm rebuild node-sass
Then try run ionic serve. Hope it helps you.

Resources