importing json file
Project id: 08563883-bf4d-41bf-9990-8cfb3247ca06
I'm trying to run a script to populate some data in the db, and I'm using this line to import some json
import testStory from './stories/test.json' assert { type: 'json' };
when I run it with railway run it says
import testStory from './stories/test.json' assert { type: 'json' };
^^^^^^
SyntaxError: Unexpected identifier
but it runs fine locally without railway. If I get rid of the assert, it says unknown file extension ".json"
3 Replies
Project ID:
08563883-bf4d-41bf-9990-8cfb3247ca06
are you using a different version of node?
are you using a dockerfile or nixpacks?
ah, it was the node version! thank you so much!