M:\src\server.js:1
import { Server } from "@ravens-engine/core/lib/server/index.js";
^^^^^^
SyntaxError: Cannot use import statement outside a module
It seems this can be resolved by adding "type": "module", manually to the package.json or using the .mjs file extension (source).
But it seems some recommended advice from searching around on google is to use require instead.
I'm not a web dev, so not sure what the recommended practice for ravens-engine is. But the tutorial should be updated to account for this, as I got quite stumped for a bit.
It seems this can be resolved by adding
"type": "module",
manually to thepackage.json
or using the.mjs
file extension (source).But it seems some recommended advice from searching around on google is to use
require
instead.I'm not a web dev, so not sure what the recommended practice for ravens-engine is. But the tutorial should be updated to account for this, as I got quite stumped for a bit.