Reputation: 1024
I'm trying to deploy my local react app to GitHub pages following these instructions: https://blog.logrocket.com/8-ways-to-deploy-a-react-app-for-free/
I added the scripts to packages.json as indicated, but when I go to npm run deploy
, I get this error:
MBP roo % npm run deploy
npm ERR! Missing script: "deploy"
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! /Users/reallymemorable/.npm/_logs/2021-10-26T15_38_56_012Z-debug.log
I even went ahead and ran npm install deploy
just in case (even though it was indicated in the tutorial).
Same error.
This is what in the log file when I cat
it:
MBP roo % cat /Users/reallymemorable/.npm/_logs/2021-10-26T15_38_56_012Z-debug.log
0 verbose cli [
0 verbose cli '/opt/homebrew/Cellar/node/17.0.1/bin/node',
0 verbose cli '/opt/homebrew/bin/npm',
0 verbose cli 'run',
0 verbose cli 'deploy'
0 verbose cli ]
1 info using [email protected]
2 info using [email protected]
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/opt/homebrew/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:project Completed in 0ms
10 timing config:load:file:/Users/reallymemorable/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/opt/homebrew/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:validate Completed in 0ms
15 timing config:load:credentials Completed in 0ms
16 timing config:load:setEnvs Completed in 1ms
17 timing config:load Completed in 5ms
18 timing npm:load:configload Completed in 5ms
19 timing npm:load:setTitle Completed in 2ms
20 timing npm:load:setupLog Completed in 0ms
21 timing config:load:flatten Completed in 2ms
22 timing npm:load:cleanupLog Completed in 1ms
23 timing npm:load:configScope Completed in 0ms
24 timing npm:load:projectScope Completed in 1ms
25 timing npm:load Completed in 11ms
26 timing command:run-script Completed in 4ms
27 verbose stack Error: Missing script: "deploy"
27 verbose stack
27 verbose stack To see a list of scripts, run:
27 verbose stack npm run
27 verbose stack at RunScript.run (/opt/homebrew/lib/node_modules/npm/lib/run-script.js:105:13)
28 verbose cwd /Users/reallymemorable/git/roo
29 verbose Darwin 20.6.0
30 verbose argv "/opt/homebrew/Cellar/node/17.0.1/bin/node" "/opt/homebrew/bin/npm" "run" "deploy"
31 verbose node v17.0.1
32 verbose npm v8.1.0
33 error Missing script: "deploy"
33 error
33 error To see a list of scripts, run:
33 error npm run
34 verbose exit 1
How can I get access to the deploy
script? Does this have something to do with my node version? (I installed it with brew install node
, so I have the latest version.)
Upvotes: 0
Views: 1250
Reputation: 1024
Problem solved. I was not cd
ed into the right directory when I ran the command...
Upvotes: 1