Closed noor-softversum closed 4 months ago
home/ubuntu/.pm2/logs/index-error.log last 15 lines: 0|index | /home/ubuntu/smartBusinessCard/frontend/src/index.js:1 0|index | import React from 'react'; 0|index | ^^^^^^ 0|index | 0|index | 0|index | SyntaxError: Cannot use import statement outside a module
ref: https://nodejs.org/api/esm.html https://stackoverflow.com/questions/58211880/uncaught-syntaxerror-cannot-use-import-statement-outside-a-module-when-import
Name the file .mjs
so it's treated as ESM.
It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.
It seems there has been no activity on this issue for a while, and it is being closed. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.
Details
Node.js version
v16.20.0
Example code
No response
Operating system
Ubuntu
Scope
I have applied every single thing. Like uninstalled
node_modules
and then installed it again and again, I don't know why this issue is comingModule and version
Not applicable.