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
Percy
Percy2y ago
Project ID: 08563883-bf4d-41bf-9990-8cfb3247ca06
luna
luna2y ago
are you using a different version of node? are you using a dockerfile or nixpacks?
sinsofangels
sinsofangelsOP2y ago
ah, it was the node version! thank you so much!
Want results from more Discord servers?
Add your server