r/programminghelp • u/Plenty-Panda • Feb 27 '21
JavaScript Why am I receiving a UnhandledPromiseRejectionWarning after deploying my create-react-app to GitHub pages?
I am coding a react app, and have setup configuration for tailwind css. I recently deployed my app to GitHub pages, and it was working fine. I then added some code and wanted to push to my main, but I was getting a message that I had to make a pull first. I pulled the code from main, there was a new file called robots.txt, and my file system was re-organized a bit, I'm assuming this is because of the deployment to GitHub pages. Anyway, after I pulled I now get this error:
(node:34533) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'id' must be a non-empty string. Received '' at Module.require (internal/modules/cjs/loader.js:1084:11) at require (internal/modules/cjs/helpers.js:73:18) at getConfigAsObject (/Users/sam/Desktop/acnh-character-ranking-neo/node_modules/@craco/craco/lib/config.js:46:20) at loadCracoConfigAsync (/Users/sam/Desktop/acnh-character-ranking-neo/node_modules/@craco/craco/lib/config.js:69:34) at Object.<anonymous> (/Users/sam/Desktop/acnh-character-ranking-neo/node_modules/@craco/craco/scripts/start.js:22:1) at Module._compile (internal/modules/cjs/loader.js:1200:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10) at Module.load (internal/modules/cjs/loader.js:1049:32) at Function.Module._load (internal/modules/cjs/loader.js:937:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
Can anybody help?
1
u/No_Owl_4425 Apr 12 '21
That error happened to me, but I set my craco.config.js (as it was described on TailwindCSS page) inside my src folder, not in the root of the project.
Take a look at the craco.config.js part https://tailwindcss.com/docs/guides/create-react-app#install-and-configure-craco
Hope it helps.
Cheers.