iot-app-kit
iot-app-kit copied to clipboard
jsx-runtime cant be found
Describe the bug jsx-runtime cannot be found
To Reproduce Steps to reproduce the behavior:
- npx create-react-app my-app
- 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;
- 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.
Created task in TwinMaker backlog