-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My project is having problems because of assert #362
Comments
it does, use import |
Same issue in import apiDocs from './swagger.json' assert {type: 'json'}; SyntaxError: Unexpected identifier 'assert' Node.js v22.2.0 |
Did you find out what it was , cause now I am having that error , says assert is unexpected identifier, I did everything, also updated my node to latest , but still not working •́ ‿ ,•̀ Update :- Instead of using 'assert' keyword I imported the json file using 'with' and what it worked !| import serviceAccountKey from './reactjs-blog-website-4f3c2-firebase-adminsdk-o3nwr-6e4413342d.json' with {type: 'json'}; |
import swaggerDocument from "../swagger.json" assert { type: "json"};
----------------------------------------------------^^^^^^
Nov 1 11:02:35 AM
Nov 1 11:02:35 AM SyntaxError: Unexpected identifier
Nov 1 11:02:35 AM at Loader.moduleStrategy (internal/modules/esm/translators.js:145:18)
Nov 1 11:02:35 AM npm ERR! code ELIFECYCLE
Nov 1 11:02:35 AM npm ERR! errno 1
Nov 1 11:02:35 AM npm ERR! one@1.0.0 start:
node index
Nov 1 11:02:35 AM npm ERR! Exit status 1
The text was updated successfully, but these errors were encountered: