-
Notifications
You must be signed in to change notification settings - Fork 73
Home
Jonathan Sharpe edited this page May 5, 2021
·
43 revisions
Welcome to the starter-kit
wiki! If you're new to this kit, you might find the following pages useful to get a high-level idea of how it fits together:
or if you just want to get going:
If you're a Code Your Future trainee or instructor, there's a channel on the CYF Slack for discussion, feedback or questions: #cyf-full-stack-starter-kit
(but please do read the material here first!)
If you're here because you've got an error, maybe it's one of the following:
Error | Reason | Solution |
---|---|---|
sh: {rimraf,concurrently}: command not found |
The required dependencies are not installed. | See Dev setup#installation |
EADDRINUSE |
You have something else listening to ports (3000, maybe also 3100) the starter kit wants to use. | See Dev setup#ports |
Error: Cannot find module 'path/to/dist/server.js' |
You're trying to run the start script and start the production server without having built the app. |
Don't run npm [run] start locally, see the Scripts. |
SyntaxError: Cannot use import statement outside a module |
You're trying to run the raw source code, rather than the transpiled output, e.g. using node server/server.js . |
Don't try to run the source code directly, see Scripts. |
Two different lockfiles found: package-lock.json and yarn.lock |
You're mixing two different package managers, NPM and Yarn. | See Yarn if you want to switch or make everyone stick with NPM. |
No 'Access-Control-Allow-Origin' header is present on the requested resource. |
You're making absolute requests (e.g. "http://localhost:3100/api/something" ) to the server, which don't go via the dev server's proxy (see Architecture). |
This starter kit is set up to use relative routes between the frontend and the backend (this avoids CORS and configuration issues in production), access e.g. "/api/something" instead. |
Refused to load something because it violates the following Content Security Policy directive
|
Helmet isn't configured correctly and is blocking some of your resources. | See Content Security Policy. |
Frontend is stuck on "Loading..." | This happens if the request to the backend /api endpoint fails. If you're using the CYF fork, you may not have a database running. |
See MongoDB. |
I'm using dotenv but process.env.<SOMETHING> is undefined in the React app code |
Not all Create React App features are implemented here, including the REACT_APP_ env var autoloading. |
See Client environment variables. |
Still have a problem? Open an issue.