I am very new to the Vue ecosystem, and am trying to learn.
I have downloaded the Vue-3 playground onto my mac by cloning the git repository:
git clone https://github.com/vuesomedev/vue-3-playground.git
on my Macbook pro, OS11.4, Big Sur From the vue-3-playground folder, I execute:
npm install
followed by
npm run serve
This last command produces the error:
npm ERR! missing script: serve
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/erlebach/.npm/_logs/2021-06-21T18_30_41_455Z-debug.log
Here is the end of the log:
0 verbose cli [
0 verbose cli '/Users/erlebach/Documents/global_npm_installs/lib/node_modules/node/bin/node',
0 verbose cli '/usr/local/bin/npm',
0 verbose cli 'run',
0 verbose cli 'serve'
0 verbose cli ]
1 info using npm#7.5.3
2 info using node#v16.3.0
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 0ms
5 timing config:load:builtin Completed in 0ms
6 timing config:load:cli Completed in 2ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:/Users/erlebach/src/2021/vue-3-playground/.npmrc Completed in 0ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:/Users/erlebach/.npmrc Completed in 1ms
11 timing config:load:user Completed in 1ms
12 timing config:load:file:/Users/erlebach/Documents/global_npm_installs/etc/npmrc Completed in 1ms
13 timing config:load:global Completed in 1ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 1ms
17 timing config:load:setEnvs Completed in 0ms
18 timing config:load Completed in 7ms
19 verbose npm-session c834a8418ac090c8
20 timing npm:load Completed in 33ms
21 timing command:run-script Completed in 2ms
22 verbose stack Error: missing script: serve
22 verbose stack at runScript (/usr/local/lib/node_modules/npm/lib/run-script.js:54:11)
23 verbose cwd /Users/erlebach/src/2021/vue-3-playground
24 verbose Darwin 20.5.0
25 verbose argv "/Users/erlebach/Documents/global_npm_installs/lib/node_modules/node/bin/node" "/usr/local/bin/npm" "run" "serve"
26 verbose node v16.3.0
27 verbose npm v7.5.3
28 error missing script: serve
29 verbose exit 1
Any insight is greatly appreciated. Thank you.
Related
I wanted to start a new package.json with npm init -y from the windows cmd and the console throws an error.
I tried to solve it this way and it didn't work.
Remove the npm cache with npm cache clean --force.
Update to the latest version of npm
Install the latest version of LTS node.
Uninstall and install node and it didn't work.
C:\Users\ADMIN\Documents\server>npm init -y
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\ADMIN\Documents\server\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\ADMIN\Documents\server\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\ADMIN\AppData\Local\npm-cache\_logs\2023-01-12T00_47_42_486Z-debug-0.log
The npm cache error log
> 0 verbose cli C:\Program Files\nodejs\node.exe
> C:\Users\ADMIN\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js 1
> info using npm#9.2.0 2 info using node#v18.13.0 3 timing
> npm:load:whichnode Completed in 0ms 4 timing config:load:defaults
> Completed in 2ms 5 timing
> config:load:file:C:\Users\ADMIN\AppData\Roaming\npm\node_modules\npm\npmrc
> Completed in 3ms 6 timing config:load:builtin Completed in 3ms 7
> timing config:load:cli Completed in 2ms 8 timing config:load:env
> Completed in 0ms 9 timing config:load:project Completed in 3ms 10
> timing config:load:file:C:\Users\ADMIN\.npmrc Completed in 1ms 11
> timing config:load:user Completed in 1ms 12 timing
> config:load:file:C:\Users\ADMIN\AppData\Roaming\npm\etc\npmrc
> Completed in 0ms 13 timing config:load:global Completed in 1ms 14
> timing config:load:setEnvs Completed in 1ms 15 timing config:load
> Completed in 14ms 16 timing npm:load:configload Completed in 14ms 17
> timing npm:load:mkdirpcache Completed in 0ms 18 timing
> npm:load:mkdirplogs Completed in 0ms 19 verbose title npm doctor 20
> verbose argv "doctor" 21 timing npm:load:setTitle Completed in 2ms 22
> timing config:load:flatten Completed in 3ms 23 timing npm:load:display
> Completed in 4ms 24 verbose logfile logs-max:10
> dir:C:\Users\ADMIN\AppData\Local\npm-cache\_logs\2023-01-12T00_58_05_674Z-
> 25 verbose logfile
> C:\Users\ADMIN\AppData\Local\npm-cache\_logs\2023-01-12T00_58_05_674Z-debug-0.log
> 26 timing npm:load:logFile Completed in 15ms 27 timing npm:load:timers
> Completed in 0ms 28 timing npm:load:configScope Completed in 0ms 29
> timing npm:load Completed in 37ms 30 silly logfile done cleaning log
> files 31 timing config:load:flatten Completed in 1ms 32 info Running
> checkup 33 http fetch GET 200
> https://registry.npmjs.org/-/ping?write=true 453ms (cache miss) 34
> http fetch GET 200 https://registry.npmjs.org/npm 261ms (cache miss)
> 35 timing command:doctor Completed in 4395ms 36 verbose exit 0 37
> timing npm Completed in 4460ms 38 info ok
I applied the solutions that I mentioned and none of them solved the error. Does anyone know how I could solve it? Since I have not found any method to solve it
I have an error when running vue.js 3 with vite
I added nodejs into Variable Environments before
I have tried these things but not working
using npm cache clear & npm cache clear --force but still error and receive npm WARN using --force Recommended protections disabled.
deleted node_modules folder and package.lock.json and run npm install
re-clone my repo on Github
re-installed Nodejs, VSCode, vite.js, update to latest npm
Debug log:
0 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli 'run',
0 verbose cli 'dev'
0 verbose cli ]
1 info using npm#8.1.2
2 info using node#v17.1.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 2ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:C:\Users\Admin\Desktop\xfago-cms-vue\.npmrc Completed in 0ms
10 timing config:load:project Completed in 0ms
11 timing config:load:file:C:\Users\Admin\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\Admin\AppData\Roaming\npm\etc\npmrc Completed in 1ms
14 timing config:load:global Completed in 1ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 7ms
19 timing npm:load:configload Completed in 7ms
20 timing npm:load:setTitle Completed in 0ms
21 timing npm:load:setupLog Completed in 0ms
22 timing config:load:flatten Completed in 2ms
23 timing npm:load:cleanupLog Completed in 1ms
24 timing npm:load:configScope Completed in 0ms
25 timing npm:load:projectScope Completed in 1ms
26 timing npm:load Completed in 12ms
27 timing command:run-script Completed in 7ms
28 verbose stack TypeError: Cannot read properties of undefined (reading 'stdin')
28 verbose stack at promiseSpawnUid (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\promise-spawn\index.js:70:18)
28 verbose stack at promiseSpawn (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\promise-spawn\index.js:15:10)
28 verbose stack at runScriptPkg (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\run-script\lib\run-script-pkg.js:54:13)
28 verbose stack at runScript (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\run-script\lib\run-script.js:9:16)
28 verbose stack at RunScript.run (C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:129:13)
29 verbose cwd C:\Users\Admin\Desktop\xfago-cms-vue
30 verbose Windows_NT 10.0.19043
31 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
32 verbose node v17.1.0
33 verbose npm v8.1.2
34 error Cannot read properties of undefined (reading 'stdin')
35 verbose exit 1```
The solution was to run the command npm init to create a "complete" package.json file.
same issue found to me beacuse i used
npm config --global set x = "Y"
so this is the huge mistake i did for that i need to unintall nodejs
and also delete C:/Users/"username"/Appdata/Roming/ delete npm from here as well,
again install it, it worked for me
i know this is not a solution but issue is according to me have only this solution.
I get the following error when I try to run my dev server. I am very new to Vue/Nuxt
0 verbose cli [
0 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-
cli.js',
0 verbose cli 'run',
0 verbose cli 'dev'
0 verbose cli ]
1 info using npm#7.6.3
2 info using node#v15.12.0
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc
Completed in 2ms
5 timing config:load:builtin Completed in 2ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 1ms
8 timing config:load:file:D:\Projects\TCG\IGG\iggbouwkostenkompas\.npmrc
Completed in 0ms
9 timing config:load:project Completed in 0ms
10 timing config:load:file:C:\Users\ghoeksema\.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:C:\Users\ghoeksema\AppData\Roaming\npm\etc\npmrc
Completed in 1ms
13 timing config:load:global Completed in 1ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 7ms
19 verbose npm-session 46dffbc867d5c2db
20 timing npm:load Completed in 14ms
21 timing command:run Completed in 694ms
22 verbose stack Error: command failed
22 verbose stack at ChildProcess.<anonymous> (C:\Program
Files\nodejs\node_modules\npm\node_modules\#npmcli\promise-spawn\index.js:64:27)
22 verbose stack at ChildProcess.emit (node:events:369:20)
22 verbose stack at maybeClose (node:internal/child_process:1067:16)
22 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
23 verbose pkgid bouwkosten-index#1.0.0
24 verbose cwd D:\Projects\TCG\IGG\iggbouwkostenkompas
25 verbose Windows_NT 10.0.19041
26 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program
Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
27 verbose node v15.12.0
28 verbose npm v7.6.3
29 error code 1
30 error path D:\Projects\TCG\IGG\iggbouwkostenkompas
31 error command failed
32 error command C:\Windows\system32\cmd.exe /d /s /c nuxt
33 verbose exit 1
I have no idea how fix it and have done some searches but none of the solutions worked for me. Clearing cache also didn't work
Thanks in advance
I moved to an M1 Mac about a month ago, and I was able to solve most of the compatibility problems but I have this Node project I cannot get it to install.
I'm running node v12.19.1 (npm 7.5.4) using x64. Let me know if I need to provide any other logs, or try any other different command
~/projects/cybersource | master *2 npm i --verbose
INT | 16s | 12.19.1 node | 20:45:38
npm verb cli [
npm verb cli '/Users/agustin/.nvm/versions/node/v12.19.1/bin/node',
npm verb cli '/Users/agustin/.nvm/versions/node/v12.19.1/bin/npm',
npm verb cli 'i',
npm verb cli '--verbose'
npm verb cli ]
npm info using npm#7.5.4
npm info using node#v12.19.1
npm timing config:load:defaults Completed in 2ms
npm timing config:load:file:/Users/agustin/.nvm/versions/node/v12.19.1/lib/node_modules/npm/npmrc Completed in 2ms
npm timing config:load:builtin Completed in 2ms
npm timing config:load:cli Completed in 1ms
npm timing config:load:env Completed in 1ms
npm timing config:load:file:/Users/agustin/projects/cybersource/.npmrc Completed in 0ms
npm timing config:load:project Completed in 0ms
npm timing config:load:file:/Users/agustin/.npmrc Completed in 0ms
npm timing config:load:user Completed in 0ms
npm timing config:load:file:/Users/agustin/.nvm/versions/node/v12.19.1/etc/npmrc Completed in 0ms
npm timing config:load:global Completed in 0ms
npm timing config:load:cafile Completed in 0ms
npm timing config:load:validate Completed in 0ms
npm timing config:load:setUserAgent Completed in 1ms
npm timing config:load:setEnvs Completed in 1ms
npm timing config:load Completed in 8ms
npm verb npm-session 7f6390bbda9e4a7b
npm timing npm:load Completed in 16ms
npm timing arborist:ctor Completed in 0ms
npm timing arborist:ctor Completed in 0ms
npm timing idealTree:init Completed in 25ms
npm timing idealTree:userRequests Completed in 0ms
npm http fetch GET 304 https://registry.npmjs.org/#nestjs%2fcommon 257ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/reflect-metadata 67ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/rxjs 57ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/#nestjs%2fcore 85ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/#nestjs%2fplatform-express 454ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/#nestjs%2fswagger 168ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/#types%2fcrypto-js 311ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/#types%2fdotenv 136ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/#types%2fuuid 165ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/#types%2fxml2js 175ms (from cache)
⸨░░░░░░░░░░░░░░░░░░⸩ ⠧ idealTree:cybersource: http fetch GET 304 https://registry.npmjs.org/#types%2fxml2js 175ms (from cache)
Few days ago all was fine and run smoothly.
Today I can’t try my project iOS and Android.
npx react-native run-ios
npx react-native run-android
both commands failed to compile.
I tried to remove node_modules folder, npm install and cd ios pod install
Cleaned the cache and checked if npm package is up to date.
All with no success.
Any help is appreciated and thank you.
Here is the log I get after the failed run-ios command:
0 verbose cli [
0 verbose cli '/usr/local/bin/node',
0 verbose cli '/usr/local/lib/node_modules/npm/bin/npm-cli.js',
0 verbose cli 'exec',
0 verbose cli '--',
0 verbose cli 'react-native',
0 verbose cli 'run-ios'
0 verbose cli ]
1 info using npm#7.5.2
2 info using node#v14.15.4
3 timing config:load:defaults Completed in 2ms
4 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 2ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:/Users/aitassouabdelkader/Downloads/_clever-programmer/_projects/_react_projects/_mes_projets/socialMedia/.npmrc Completed in 1ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:/Users/aitassouabdelkader/.npmrc Completed in 1ms
11 timing config:load:user Completed in 1ms
12 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 1ms
17 timing config:load:setEnvs Completed in 0ms
18 timing config:load Completed in 9ms
19 verbose npm-session f851aed9bb473f1b
20 timing npm:load Completed in 18ms
21 timing command:exec Completed in 15519ms
22 verbose stack Error: command failed
22 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/#npmcli/promise-spawn/index.js:64:27)
22 verbose stack at ChildProcess.emit (events.js:315:20)
22 verbose stack at maybeClose (internal/child_process.js:1048:16)
22 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
23 verbose pkgid socialMedia#0.0.1
24 verbose cwd /Users/aitassouabdelkader/Downloads/_clever-programmer/_projects/_react_projects/_mes_projets/socialMedia
25 verbose Darwin 20.3.0
26 verbose argv "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/bin/npm-cli.js" "exec" "--" "react-native" "run-ios"
27 verbose node v14.15.4
28 verbose npm v7.5.2
29 error code 1
30 error path /Users/aitassouabdelkader/Downloads/_clever-programmer/_projects/_react_projects/_mes_projets/socialMedia
31 error command failed
32 error command sh -c react-native "run-ios"
33 verbose exit 1