For some reason, I can't seem to get next page to load when the pages folder is in a different directory. I'm not sure at what point the code is hanging on.
yarn install in server and web folderyarn run dev in server folderHoping to load to the hello world page when browsing localhost:3000.
Figured it out. Needed to add eslint-loader as a dependency and move babel around.
Running Ran into this on 9.1.1 for this project: https://github.com/openmultiplayer/homepage/ (master branch)
In case anyone else runs into this, the following may help:
To debug the issue, I ran next build and sure enough, an actual error appeared that wasn't present during next (dev):
Error: > Build failed because of webpack errors
The error was a missing module Module not found: Error: Can't resolve 'url-loader' which was somehow lost during a prune/update/shuffle of our deps and tooling.
Strange how this wasn't surfaced during the dev build but definitely good to know that running next build can surface issues invisible during dev.
Thanks @Southclaws. I wouldn't have known how to debug my issue if I didn't see your response. Any way to fix this in dev??
Just make sure your dependencies are satisfied and run next build, after that the dev script should work again. Not sure if anything else causes this though.
i just tested your method: next build >> next dev
but 3001 port still has infinite loop and my project does not have any output .any other solution ???
Solved!!!!
Most helpful comment
RunningRan into this on 9.1.1 for this project: https://github.com/openmultiplayer/homepage/ (master branch)In case anyone else runs into this, the following may help:
To debug the issue, I ran
next buildand sure enough, an actual error appeared that wasn't present duringnext(dev):The error was a missing module
Module not found: Error: Can't resolve 'url-loader'which was somehow lost during a prune/update/shuffle of our deps and tooling.Strange how this wasn't surfaced during the dev build but definitely good to know that running
next buildcan surface issues invisible during dev.