Skip to content

jsx-runtime cant be found #1862

@nickcorbett15

Description

@nickcorbett15

Describe the bug
jsx-runtime cannot be found

To Reproduce
Steps to reproduce the behavior:

  1. npx create-react-app my-app
  2. add the following component:
import { initialize } from '@iot-app-kit/source-iottwinmaker';
import { SceneViewer } from '@iot-app-kit/scene-composer';

function TwinMaker() {

    const awsCredentials = {
        accessKeyId: <yourCredentials>
        secretAccessKey: <yourCredentials
    }

    const sceneLoader = initialize(<yourScene>, {
        awsCredentials,
        awsRegion: 'us-east-1'
    }).s3SceneLoader('m01');

    return (
        <>
            <span>
                <h1>
                TwinMaker Scene
                </h1>
                <SceneViewer sceneLoader={sceneLoader}></SceneViewer>
            </span>
        </>
    )
}
export default TwinMaker;
  1. Add component to be viewed in App.tsx

Expected behavior
You should be able to view your scene

Actual Output:

ERROR in ./node_modules/react-dnd/dist/esm/core/DndProvider.mjs 28:0-51
Module not found: Error: Package path ./jsx-runtime.js is not exported from package \app-directory\node_modules\react (see exports field in \app-directory\node_modules\react\package.json)

webpack compiled with 1 error and 272 warnings

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows 10
  • Browser: Chrome
  • Version: Version 116.0.5845.111

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    TwinMaker TeamIssues associated with the TwinMaker teambugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions