npm install -g #vue/cli get error VUE CLI INSTALL ERROR npm star and vue serve - vue.js

npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/daniel/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/daniel/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! /home/daniel/.npm/_logs/2022-11-11T00_09_58_091Z-debug-0.log
npm install -g #vue/cli
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated subscriptions-transport-ws#0.11.0: The subscriptions-transport-ws package is no longer maintained. We recommend you use graphql-ws instead. For help migrating Apollo software to graphql-ws, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using graphql-ws, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
changed 847 packages, and audited 848 packages in 40s
64 packages are looking for funding
run npm fund for details
4 vulnerabilities (2 moderate, 2 high)
To address all issues (including breaking changes), run:
npm audit fix --force
Run npm audit for details.
Trying to install vue/cli and trying to run vue will do, but the errors described

Related

I cant install node modules in react native ,and I get a error message, how can i fix this?

After installing some packages I stumbeled against this error, and I dont know how to fix this:
I hope someone knows how to get this cleaned up, I dont care if I have to install all the packages again.
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command C:\Program Files\nodejs\node.exe C:\Users\muziek\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\muziek\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! > #expo/vector-icons#13.0.0 prepare
npm ERR! > expo-module prepare && npm run generate-lazy && npm run copy-vendor
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN deprecated set-value#0.4.3: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm ERR! npm WARN deprecated mixin-deep#1.3.1: Critical bug fixed in v2.0.1, please upgrade to the latest version.
npm ERR! npm WARN deprecated set-value#2.0.0: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm ERR! npm WARN deprecated kleur#2.0.2: Please upgrade to kleur#3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
npm ERR! npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! npm WARN deprecated har-validator#5.1.3: this library is no longer supported
npm ERR! npm WARN deprecated request-promise-native#1.0.7: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm ERR! npm WARN deprecated chokidar#2.1.2: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm ERR! npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! npm WARN deprecated w3c-hr-time#1.0.1: Use your platform's native performance.now() and performance.timeOrigin.
npm ERR! npm WARN deprecated source-map-url#0.4.0: See https://github.com/lydell/source-map-url#deprecated
npm ERR! npm WARN deprecated left-pad#1.3.0: use String.prototype.padStart()
npm ERR! npm WARN deprecated debug#4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm ERR! npm WARN deprecated debug#3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm ERR! npm WARN deprecated sane#2.5.2: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm ERR! npm WARN deprecated request#2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! npm WARN deprecated source-map-resolve#0.5.2: See https://github.com/lydell/source-map-resolve#deprecated
npm ERR! npm WARN deprecated uuid#3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm ERR! npm WARN deprecated mkdirp#0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm ERR! npm WARN deprecated core-js#2.6.5: core-js#<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! C:\Users\muziek\AppData\Local\npm-cache\_cacache\tmp\git-clone9p2w60\node_modules\expo-module-scripts\bin\expo-module-prepare:3
npm ERR! set -eo pipefail
npm ERR! ^^^^^^^^
npm ERR!
npm ERR! SyntaxError: Unexpected identifier
npm ERR! at Object.compileFunction (node:vm:352:18)
npm ERR! at wrapSafe (node:internal/modules/cjs/loader:1031:15)
npm ERR! at Module._compile (node:internal/modules/cjs/loader:1065:27)
npm ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
npm ERR! at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
npm ERR! at node:internal/main/run_main_module:17:47
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path C:\Users\muziek\AppData\Local\npm-cache\_cacache\tmp\git-clone9p2w60
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c expo-module prepare && npm run generate-lazy && npm run copy-vendor
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! C:\Users\muziek\AppData\Local\npm-cache\_logs\2023-01-09T08_48_36_983Z-debug-0.log
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\muziek\AppData\Local\npm-cache\_logs\2023-01-09T08_48_13_969Z-debug-0.log
Try deleting the node_modules directory and running npm install again. This will force npm to reinstall all of the dependencies, which might fix the problem.
If that doesn't work, you might want to try deleting the package-lock.json file and running npm install again.
If none of these steps help, you can try running npm install --force. However, using the --force flag can also cause problems if it causes npm to overwrite or delete files that are needed for your project to work correctly. It's generally a good idea to use the --force flag only as a last resort, after other methods of fixing the problem have been tried.
Try this,
run npm cache clean --force
Delete node_modules like $ rm -rf node_modules also delete package-lock.json
Install fresh packages npm install
Start the application npm start
Let us know your feedback.
Thanks

Vue - The Cli gives an error on installing

I just installed Ubuntu and tried to install the vue cli but got this error
here's the error
npm WARN deprecated subscriptions-transport-ws#0.11.0: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
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 source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules'
npm ERR! }
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/m/.npm/_logs/2022-08-17T06_58_04_490Z-debug.log
I tried installing other npm packages and it worked, the cli is the only one that doesn't work
Most probably it has to do with the user rights. Here's an article on npm addressing your problem.
Boils down to two things you can try:
Reinstall npm with a node version manager
Manually change npm's default directory
I had this issue many times in the past and tried various solutions. Some of them didn't do much more than f*cking my setup even more, that's why it's really worthy to follow the official path.

unable to run npm start or npm install in Ubuntu 18.04

I'm new to front-end development and nodejs / react so please bear with me if this is a silly question.
I was trying to learn by using this open project: https://github.com/ilhammeidi/boss-lite
In the readme, it states pretty clearly on how to deploy this react project:
Clone this project
Install module dependencies by run this script in terminal npm install
After finish downloading, then run the app. npm run dev
Navigate to http://localhost:8080
However I cannot get even the first npm install step right on my Ubuntu 18.04:
john#home:~/learnFE/code/boss-lite$ npm install
npm WARN deprecated material-ui-pickers#1.0.1: You can now upgrade to #material-ui/pickers. Documentation for v2 can be found at https://material-ui-pickers-v2.dmtr-kovalenko.now.sh/
npm WARN deprecated axios#0.17.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated react-router-redux#5.0.0-alpha.9: This project is no longer maintained.
npm ERR! Linux 5.4.0-67-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! code EMISSINGARG
npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror <http://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/john/learnFE/code/boss-lite/npm-debug.log
john#home:~/learnFE/code/boss-lite$
I searched the error and found this post in which this is a widely accepted solution: run sudo npm install -g npm#latest, however:
john#home:~/learnFE/code/boss-lite$ sudo npm install -g npm#latest
▌ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine npm#7.9.0: wanted: {"node":">=10"} (current: {"node":"8.10.0","npm":"3.5.2"})
/usr/local/lib
└── (empty)
npm ERR! Linux 5.4.0-67-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "npm#latest"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! path /usr/local/lib/node_modules/.staging/#npmcli/ci-detect-c7bf9552
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/#npmcli/ci-detect-c7bf9552' -> '/usr/local/lib/node_modules/npm/node_modules/#npmcli/ci-detect'
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/#npmcli/ci-detect-c7bf9552' -> '/usr/local/lib/node_modules/npm/node_modules/#npmcli/ci-detect'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /home/john/learnFE/code/boss-lite/npm-debug.log
npm ERR! code 1
john#home:~/learnFE/code/boss-lite$
It says This is most likely not a problem with npm itself. How to proceed then?
The linux kernel version also appears:
npm ERR! Linux 5.4.0-67-generic
I'm clueless right now and it is so frustrating to be failing at the simple and basic step...
Maybe it is because the github project itself is flawed? I guess not.
Probably this is some really basic stuff. Any help?
These errors were simply due to the packages being obsolete for your OS.
Just update them by running,
npm update --force
This will install the latest versions of these packages. This will take a while depending on your internet connection.
Then run npm start and it works.

React native create new app issue - npm exited with non-zero code: 1

expo init test111
? Choose a template: expo-template-tabs
Using npm to install packages. You can pass --yarn to use Yarn instead.
Extracting project files...
Customizing project...
Unable to initialize git repo. git not in PATH.
Installing dependencies...
npm install
npm WARN deprecated deep-assign#3.0.0: Check out lodash.merge or merge-options instead.
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated core-js#1.2.7: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated left-pad#1.3.0: use String.prototype.padStart()
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules\jest-haste-map\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t https://github.com/naver/hammer.js.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
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\mkame\AppData\Roaming\npm-cache_logs\2020-02-16T22_14_16_693Z-debug.log
npm exited with non-zero code: 1
Set EXPO_DEBUG=true in your env to view the stack trace.
rm -rf node_modules/
npm install
Try removing node modules and reinstall it. This worked for me.

I am getting this error while installing npm

F:\Hcheckup2.0>npm install
npm WARN deprecated core-js#2.5.1: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated ckeditor#4.7.3: We have renamed the #ckeditor package. New versions are available under the #ckeditor4 name.
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated gulp-util#3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated opn#6.0.0: The package has been renamed to open
npm WARN deprecated browserslist#1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated json3#3.3.2: Please use the native JSON object instead of JSON 3
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
npm WARN deprecated circular-json#0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git#github.com/angular/web-animations-js.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
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\SONY\AppData\Roaming\npm-cache_logs\2020-01-07T04_33_32_195Z-debug.log
update your core-js with this command
npm install --save core-js#^3
also read https://reactjs.org/blog/2017/09/25/react-v15.6.2.html this you will get better things.
The error is related to web-animations.js. Can you try removing and adding the package.json reference for this library. Also more information about your package contents will be helpful.