-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
Error importAssertions #316
Comments
Hello @jayair , Is there any solution for this? both alternatives of this article: https://www.stefanjudis.com/snippets/how-to-import-json-files-in-es-modules-node-js/ Thanks |
The problem is the depreciated "babel-eslint" missing "importAssertions" in its plugins list. I replaced "babel-eslint" with "@babel/eslint-parser" and modified some of the settings in order to support import assertions. I made a quick fix on my side, but don't have time to do a proper pull request for this. Take a look at this commit: |
@aresn Hello, thanks for answering. How can I apply this solution locally in detail and not wait for an update of this dependency? This situation has me somewhat complicated when starting my APIs locally and then having to deploy by modifying the lines where JSON files are imported. Thanks a lot |
Hi @jayair good day. Is it possible to add a solution for this problem? |
I haven't had a chance to look at this. If there's a PR that I can review, I'll take a look and merge it. |
Thank you @jayair, I will be pending. I'm a bit stuck with this solution. |
@jayair Hello! is it possible to know if there is an update planned for this problem? thank you |
After waiting so long for this problem, I have implemented @aresn solution. Anyway thank you very much :) |
Hello good day.
I have an API that uses json files on some endpoints.
I am using NODE 16 and when starting the application on local server, the console requires me to use
assert { type: 'json' }
when importing json files:import FILE from 'file.json' assert { type: 'json' }
When executing
serverless deploy
the console shows the following error:Support for the experimental syntax 'importAssertions' isn't currently enabled
Helpme plis :( thanks
serverless.yml
The text was updated successfully, but these errors were encountered: