-
Notifications
You must be signed in to change notification settings - Fork 73
Home
Jonathan Sharpe edited this page Aug 24, 2024
·
43 revisions
Note if you're using v1 of the starter kit (i.e. you have
client/
andserver/
directories rather thanapi/
andweb/
, see v1 Home.
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 |
---|---|---|
<number> <level> severity vulnerabilities To address issues that do not require attention...
|
Some security vulnerabilities have been reported within your dependencies | You may be able to install fixed versions, see Dependencies#audit |
npm ERR! code EBADENGINE , npm ERR! engine Unsupported engine
|
This starter kit is tested and supported on the Node `^20.9 | |
sh: <package>: command not found or <package> is not recognized as an internal or external command, operable program or batch file (usually <package> will be concurrently or rimraf ) |
The required dependencies are not installed. | See Dev setup#Installation |
Internal Server Error (in the browser) / ENOENT: no such file or directory, stat 'path/to/api/static/index.html' (in the server logs) |
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. |
EADDRINUSE |
You have something else listening to ports (3000, maybe also 3100) the starter kit wants to use. | See Dev setup#Ports |
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). |
Do not install the Express cors middleware! 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. |
UnhandledPromiseRejection |
Somewhere, most likely in one of your Express handler functions, there's a rejected promise that isn't being handled correctly. | See Unhandled promise rejections. |
error: database "<db>" does not exist |
You're using Postgres but haven't created the appropriate database. | Run createdb <db> (if you're using Docker you may need to set some options, see Dev setup#database). |
Error: connect ECONNREFUSED 127.0.0.1:5432 |
You don't have Postgres running. | See Dev setup#database. |
TypeError: Invalid URL |
If it's coming from node_modules/pg-connection-string/ via server/db.js , your dbUrl is incorrect. |
See Dev setup#database. |
error: password authentication failed for user <user> or error: Error: SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string
|
If you're using e.g. Docker to run Postgres, you may need to provide a username and password. | See Dev setup#database. |
None of the above | Open an issue. |