0

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.

  • 1
    Try executing ‘npm run start’ – Chin. Udara Jun 21 '21 at 18:56
  • 1
    It worked! So may I ask about the difference between ```npm run start``` and ```npm run serve```? Never mind, I found the answer (https://stackoverflow.com/questions/40190538/when-to-use-npm-start-and-when-to-use-ng-serve) I have to look inside package.json and find out the possibilities in the "scripts" field. Thanks for unblocking me! – Gordon Erlebacher Jun 21 '21 at 20:18

0 Answers0