generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
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;
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels