Closed fahad39 closed 6 months ago
Hi,
thanks for the report.
you can manually remove the part "assert {type:"json}" but not in production
I did not understand this part. Could you describe the steps to reproduce this error?
Hi,
thanks for the report.
you can manually remove the part "assert {type:"json}" but not in production
I did not understand this part? Could you describe the steps to reproduce this error?
yes, so just install the latest verison in your react applicaion and start the server and it will show this error and then you have to go to nodes modules find the library and remove the line from the file.
This is the error we get:
SyntaxError: /home/runner/work/terraso-web-client/terraso-web-client/n
ode_modules/world-countries/index.mjs: Support for the experimental syntax
'importAttributes' isn't currently enabled (1:44):
> 1 | export { default } from './countries.json' assert { type: 'json' };
| ^
2 |
Add @babel/plugin-syntax-import-attributes (https://github.com/babel/babel/
tree/main/packages/babel-plugin-syntax-import-attributes) to the 'plugins'
section of your Babel config to enable parsing.
at parser.next (<anonymous>)
at normalizeFile.next (<anonymous>)
at run.next (<anonymous>)
at transform.next (<anonymous>)
Can you make v5 work with a default-configuration React app (as v4 does)?
fixed via #504
@fahad39 could you try again with the version on master
?
After installing via NPM or yarn in react. This error will show up "export { default } from './countries.json' assert { type: 'json' };" in production you can manually remove the part "assert {type:"json}" but not in production
Version : 5.0.0