Comment on page
Troubleshooting
Collection of frequently asked questions with ideas on how to troubleshoot and solve them.
If you see the following error:
SyntaxError: Cannot use import statement outside a module
The solution is to add the line
"type": "module"
in package.json
.This is a known Mongoose error. The fix is to add this line when you are exporting your model:
export const Model = mongoose.models.Model || mongoose.model('Model', modelSchema);
Sometimes, you may see a red error message at the top instead of the green
Success
label. Most likely that means your local server has encountered an error or is running on a different port.
Genezio Test Interface connection Failed
To establish the connection, verify on which port your server is running and fill that port in the provided input, the click
Connect
(or press Enter). genezio local
watch for files changes inside your backend directory. If genezio local
goes into an infinite reloading loop, you might need to use .genezioignore
to ignore the files that keep changing.You are probably trying to use the generated SDK in a browser environment, but in
genezio.yaml
is configured to run in node
cli environment. To change that. you will need to change the runtime
option under sdk.options
from node
to browser
in genezio.yaml
.You have to add the following lines into your
tsconfig.json
: "compilerOptions": {
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
},
You have to add the following lines into your
tsconfig.json
: "compilerOptions": {
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
},
Last modified 2mo ago