iot-app-kit icon indicating copy to clipboard operation
iot-app-kit copied to clipboard

jsx-runtime cant be found

Open nickcorbett15 opened this issue 1 year ago • 1 comments

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.

nickcorbett15 avatar Sep 04 '23 15:09 nickcorbett15

Created task in TwinMaker backlog

haweston avatar Feb 01 '24 21:02 haweston