I tried to install websocket via " npm install ws" , but it always returned
npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "ws" under a package
npm ERR! also called "ws". Did you name your project the same
npm ERR! as the dependency you're installing?
npm ERR!
npm ERR! For more information, see:
npm ERR! https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/croydon/.npm/_logs/2021-03-18T00_55_40_611Z-debug.log
please could you help on how to fix it?
Thanks!
I've only been successful installing ws globally.
Note that the old way of installing globally is deprecated.
You will get an error message with instructions if you try it.
The new way:
npm install --location=global ws
Related
I am trying to setup a express.js server using there generator. I have followed the documation and I have succesfully created the basic structure. However if I try to run the given command (SET DEBUG=transcriptverificationserver:* & npm start) to start the server I always get the following error:
npm ERR! Missing script: "start"
npm ERR!
npm ERR! Did you mean one of these?
npm ERR! npm stars # View packages marked as favorites
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\a\AppData\Local\npm-cache\_logs\2022-11-28T22_43_43_285Z-debug-0.log
PS C:\Users\a\Desktop\Verified Transcripts\Webpage> npm start
npm ERR! Missing script: "start"
npm ERR!
npm ERR! Did you mean one of these?
npm ERR! npm star # Mark your favorite packages
npm ERR! npm stars # View packages marked as favorites
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\a\AppData\Local\npm-cache\_logs\2022-11-28T22_45_41_209Z-debug-0.log
I assume its an issue within the package.json file. The script part looks as following:
"scripts": {
"start": "node ./bin/www"
},
I haven´t change anything in the files or structure and I was simply copying the commands from the documentation (https://expressjs.com/en/starter/generator.html)
Thanks for any help in advance
I have tried it again and this time everthing works. I am not sure what has happend before but I might have used the old installation method.
$ npm install -g express-generator
$ express
With my secound try I ensured to use the new method:
$ npx express-generator
When I try to install npm globally, using the command
npm install -g expo-cli
I am getting an error that says
npm install -g expo-cli
npm ERR! code ERR_OSSL_UNSUPPORTED
npm ERR! error:1E08010C:DECODER routines::unsupported
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache_logs\2022-04-20T21_10_42_635Z-debug-0.log
Although I just updated my node version to version 17.9.0 and my npm version is 8.5.5.
What can I do to solve this problem?
So I have a project available on stackblitz that I want to use offline for my own purposes. for reference, here is the link to what I want to use- https://stackblitz.com/edit/nvs-angular-search-dropdown-istnzp. So, I tried to download the code and planned to run it using npm install and ng serve. but I am getting lots of errors on running npm install saying like this:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: angular#0.0.0
npm ERR! Found: #angular/compiler#12.0.3
npm ERR! node_modules/#angular/compiler
npm ERR! #angular/compiler#"^12.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/compiler#"7.0.4" from #angular/compiler-cli#7.0.4
npm ERR! node_modules/#angular/compiler-cli
npm ERR! dev #angular/compiler-cli#"~7.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\cnaag\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\cnaag\AppData\Local\npm-cache\_logs\2021-06-06T10_39_43_617Z-debug.log
Any help in this regard would be amazing!
Instead of NPM, install Yarn on your machine and run yarn install
sudo npm install -global #angular/cli
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm ERR! code EEXIST
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/#angular/cli/bin/ng
npm ERR! dest /usr/bin/ng
npm ERR! errno -17
npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/#angular/cli/bin/ng' -> '/usr/bin/ng'
npm ERR! File exists: /usr/bin/ng
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-10-03T08_55_44_693Z-debug.log
I also use Ubuntu 20.04 and I just had the same problem as you.
Here I just updated the npm package (via synaptic).
After this, sudo npm i -g #angular/cli worked ok.
This point solved my problem, maybe that can help you too.
I had a similar problem on Ubuntu 20.04, after I install nodejs (in my case 14.17 stable) and try install Angular.
I went to the directory /usr/bin and deleted the ng file,
after sudo npm i -g #angular/cli.
So ng --version to see if installed ok.
I hope help yo, bye.
i tried install vue cli.but I am getting a lot of strange errors. I searched for errors but could not find them:
linux#admin:~/Masaüstü/learn-vue$ sudo npm install vue -g
[sudo] password for linux:
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EAI_AGAIN: request to https://registry.npmjs.org/vue failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
+ vue#2.6.12
updated 1 package in 10.676s
linux#admin:~/Masaüstü/learn-vue$ vue --version
'vue' komutu sistemde bulunamadı. Ama şununla kurulabilir:
sudo snap install vue
linux#admin:~/Masaüstü/learn-vue$ npm i -g #vue/cli
npm ERR! Response timeout while trying to fetch https://registry.npmjs.org/#vue%2fcli-ui-addon-webpack (over 30000ms)
npm ERR! A complete log of this run can be found in:
npm ERR! /home/linux/.npm/_logs/2020-09-24T17_37_08_787Z-debug.log
linux#admin:~/Masaüstü/learn-vue$ npm i -g vue-cli#2.9.6
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/vue-cli failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443
npm ERR! A complete log of this run can be found in:
npm ERR! /home/linux/.npm/_logs/2020-09-24T17_40_02_518Z-debug.log
linux#admin:~/Masaüstü/learn-vue$ npm cache clean
npm ERR! As of npm#5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. On the other hand, if you're debugging an issue with the installer, you can use `npm install --cache /tmp/empty-cache` to use a temporary cache instead of nuking the actual one.
npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/linux/.npm/_logs/2020-09-24T17_40_33_560Z-debug.log
linux#admin:~/Masaüstü/learn-vue$ sudo npm cache clean
npm ERR! As of npm#5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. On the other hand, if you're debugging an issue with the installer, you can use `npm install --cache /tmp/empty-cache` to use a temporary cache instead of nuking the actual one.
npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-09-24T17_40_40_872Z-debug.log
linux#admin:~/Masaüstü/learn-vue$ sudo npm cache clean --force
npm WARN using --force I sure hope you know what you are doing.
linux#admin:~/Masaüstü/learn-vue$
I searched everything on the internet, I asked questions in many forums but unfortunately I could not find an answer. Finally, I opened the topic here hoping to find an answer.
guys please help me.Thanks
Vue namespaced their cli (from v3). Use npm i -g #vue/cli
EDIT: Check the docs for more info
here:
linux#admin:~/Masaüstü/learn-vue$ sudo npm i -g #vue/cli
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated #hapi/joi#15.1.1: joi is leaving the #hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/address#2.1.4: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules/#vue/cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN #vue/compiler-sfc#3.0.0 requires a peer of vue#3.0.0 but none is installed. You must install peer dependencies yourself.
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules' }
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/linux/.npm/_logs/2020-09-24T18_13_12_868Z-debug.log
linux#admin:~/Masaüstü/learn-vue$ vue --version
'vue' komutu sistemde bulunamadı. Ama şununla kurulabilir:
sudo snap install vue
linux#admin:~/Masaüstü/learn-vue$
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\moham/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\moham\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\moham\AppData\Local\npm-cache_logs\2021-12-30T09_56_30_171Z-debug.log