1

I'm trying to deploy a react.js app to github pages (I'm following this guide https://medium.freecodecamp.com/surge-vs-github-pages-deploying-a-create-react-app-project-c0ecbf317089) but I keep getting the following error when I run npm run deploy

ENOENT: no such file or directory, stat '/Users/name/Documents/Web Dev/100 Web Projects/wikipediaviewer/build'

npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "deploy"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! wikipediaviewer@1.0.0 deploy: `npm run build&&gh-pages -d build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the wikipediaviewer@1.0.0 deploy script 'npm run build&&gh-pages -d build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the wikipediaviewer package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build&&gh-pages -d build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs wikipediaviewer
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls wikipediaviewer
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/name/Documents/Web Dev/100 Web Projects/wikipediaviewer/npm-debug.log

Can anyone pls help me figure out what I am doing wrong? If i run npm run build it builds successfully. Also i didn't use create-react-app to build this app, could that be the issue & what would I have to do to fix it.

Nedu
  • 49
  • 9

1 Answers1

2

It seems like you didn't create a build folder after you ran npm run build, so that you should change gh-pages -d path-to-your-build

giraffesyo
  • 4,860
  • 1
  • 29
  • 39