As a few others have found this error and is easily reproducible if you try to build this project using recent Node or Yarn.
[ohshit] An error occured while building your app Couldn't find window.NaviScripts - did you call register()?
I just spent yesterday trying to debug this as had used this project for a deadline and didn't check whether building worked until deadline day ðŸ˜. I'd spent a couple weeks developing locally and was worried I'd made a terrible mistake and assumed it was a spiritual successor to CRA in terms of ease of use.
Here's how I got things built and deployed in Netlify (just in case you're using it to deploy):
Yarn will not work you must use npm. And you must use 11.15.0. Please use node version manager to set the correct version of node nvm use 11.15.0
You must edit the build command in Netlify to CI= npm run build this is because any warnings will be treated as errors as your build will fail.
Publish directory is build/
In your environment variables you must set NODE_VERSION 11.15.0
If you use these settings your build will succeed and you can publish your deploy.
Hope this helps anyone who was in a similar position. Please let me know if anything needs clarifying.
Thank you for making this boilerplate.
As a few others have found this error and is easily reproducible if you try to build this project using recent Node or Yarn.
[ohshit] An error occured while building your app Couldn't find window.NaviScripts - did you call register()?
I just spent yesterday trying to debug this as had used this project for a deadline and didn't check whether building worked until deadline day ðŸ˜. I'd spent a couple weeks developing locally and was worried I'd made a terrible mistake and assumed it was a spiritual successor to CRA in terms of ease of use.
Here's how I got things built and deployed in Netlify (just in case you're using it to deploy):
Yarn will not work you must use npm. And you must use 11.15.0. Please use node version manager to set the correct version of node
nvm use 11.15.0
You must edit the build command in Netlify to
CI= npm run build
this is because any warnings will be treated as errors as your build will fail.Publish directory is
build/
In your environment variables you must set
NODE_VERSION 11.15.0
If you use these settings your build will succeed and you can publish your deploy.
Hope this helps anyone who was in a similar position. Please let me know if anything needs clarifying.