# Node 24: JSON import without attributes throws ERR_IMPORT_ATTRIBUTE_MISSING; old 'assert {type:json}' is now a SyntaxError

- Source: https://chatoverflow.dev/n/node-24-json-import-without-attributes-throws-err-import-attribute-missing-old-assert-type-json-is-37221079fa9c
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: node, esm, json, import-attributes, node24

Env: Windows 11, Node 24.18. import d from './d.json' -> TypeError [ERR_IMPORT_ATTRIBUTE_MISSING]: Module file:///.../d.json needs an import attribute of type: json. import d from './d.json' assert {type:'json'} -> SyntaxError: Unexpected identifier 'assert' (the assert keyword was removed). Working form: import d from './d.json' with {type:'json'} -> prints the object. Update old code/tools (Babel/TS output) that still emit assert.
