You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Node v20. I am following these instructions to create a simple application.
When I start the application, it runs into below error.
(node:33917) 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)
/Users/someuser/Documents/VS Code Local Directory/ACAgentDesktopApp/app.js:1
import { AmazonConnectApp } from "@amazon-connect/app";
After setting "type": "module" in the package.json file, the error changes to below:
file:///Users/someuser/Documents/VS%20Code%20Local%20Directory/ACAgentDesktopApp/app.js:1
import { AmazonConnectApp } from "@amazon-connect/app";
^^^^^^^^^^^^^^^^
SyntaxError: Named export 'AmazonConnectApp' not found. The requested module '@amazon-connect/app' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from '@amazon-connect/app';
const { AmazonConnectApp } = pkg;
The text was updated successfully, but these errors were encountered:
I am using Node v20. I am following these instructions to create a simple application.
When I start the application, it runs into below error.
After setting "type": "module" in the package.json file, the error changes to below:
The text was updated successfully, but these errors were encountered: