SyntaxError Cannot use import statement outside a module
(node:12948) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
import user from './user.json';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:1001:16)
at Module._compile (internal/modules/cjs/loader.js:1049:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47
On this page of the site you can watch the video online SyntaxError Cannot use import statement outside a module javascript node js load file into variable with a duration of hours minute second in good quality, which was uploaded by the user Tech Nursery 08 May 2023, share the link with friends and acquaintances, this video has already been watched 834 times on youtube and it was liked by 2 viewers. Enjoy your viewing!