Skip to content

@calcom/embed-react types are not properly exported for "type": "module" #11408

@LarsArtmann

Description

@LarsArtmann

Bug

After I moved to bun and js module I got this error:

Screenshot 2023-09-17 at 10 20 31

real code (nextjs 13 module)

const Cal = dynamic(() => import("@calcom/embed-react") as Cal, { ssr: false });
...

package.json

{
	"name": "@nobletary/feature-appointment",
	"version": "0.1.0",
	"type": "module",
	"private": true,
	"main": "src/client.js",
	"types": "src/client.ts",
	"scripts": {
		"...": "",
		"build": "bun build --target=browser src/client.ts --outfile=src/client.js"
	},
	"dependencies": {
		"@calcom/embed-react": "1.3.0",
		"@nobletary/types": "workspace:*",
		"@nobletary/utils": "workspace:*",
		"next": "13.4.19",
		"react": "18.2.0"
	},
	"devDependencies": {
		"typescript": "5.2.2",
		"upd": "2.9.5"
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions