Running ‘node index.js’
Oct 10 08:45:40 AM (node:54) Warning: To load an ES module, set “type”: “module” in the package.json or use the .mjs extension.
Oct 10 08:45:40 AM (Use node --trace-warnings ...
to show where the warning was created)
Oct 10 08:45:40 AM /opt/render/project/src/server/index.js:1
Oct 10 08:45:40 AM import cors from ‘cors’;
Oct 10 08:45:40 AM ^^^^^^
Oct 10 08:45:40 AM
Oct 10 08:45:40 AM SyntaxError: Cannot use import statement outside a module
Oct 10 08:45:40 AM at wrapSafe (internal/modules/cjs/loader.js:984:16)
Oct 10 08:45:40 AM at Module._compile (internal/modules/cjs/loader.js:1032:27)
Oct 10 08:45:40 AM at Object.Module._extensions…js (internal/modules/cjs/loader.js:1097:10)
Oct 10 08:45:40 AM at Module.load (internal/modules/cjs/loader.js:933:32)
Oct 10 08:45:40 AM at Function.Module._load (internal/modules/cjs/loader.js:774:14)
Oct 10 08:45:40 AM at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
Oct 10 08:45:40 AM at internal/main/run_main_module.js:17:47
Might be worth checking the 6th line of your deploy output - this will indicate the version of Node your service is deploying as - if you’ve not changed from our default it might be that it’s unsupported in the older Node version perhaps
Regards,
John B
Render Support, UTC+1
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.