score:0
your are trying to use jsx/tsx
syntax in a regular typescript ts
file. rename the index.ts
to index.tsx
and then modify the entry
in webpack config to './src/index.tsx'
.
alternately, if you want to keep using the .ts
extension for your index.ts
file, then manually create vdom element as:
import * as react from 'react';
reactdom.render(
react.createelement(app),
document.getelementbyid('app'));
Source: stackoverflow.com
Related Query
- Webpack5 ts-loader could not compile react files
- Typescript react - Could not find a declaration file for module ''react-materialize'. 'path/to/module-name.js' implicitly has an any type
- React Native: JAVA_HOME is not set and no 'java' command could be found in your PATH
- React Proxy error: Could not proxy request /api/ from localhost:3000 to http://localhost:8000 (ECONNREFUSED)
- React Apollo Error: Invariant Violation: Could not find "client" in the context or passed in as an option
- React Native on Ipad - Error - could not connect to development server
- Could not find a required file. Name: index.html in react with docker compose
- React Native 0.31: Could not get BatchedBridge Error
- React Webpack - Error: Module is not a loader (must have normal or pitch function)
- React Hot Loader v3. this component is not accepted by Hot Loader
- React-Native: React could not be found within project or in these directories
- react-i18next not loading json translation files in React app created with create-react-app
- Could not simulate mouseEnter event using React Test Utils
- Not able to import css files in react
- Warning: React instrumentation encountered an error: Error: Could not find ID for Fiber "SvgCheck"
- webpack not reflecting changes in js files with react and django
- React Native: Could not connect to development server
- Unable to compile react application as it says "Module not found"
- Webpack: npm start "Module not found: Error: Can't resolve ..." after moving location for webpack / react files
- Could not find a required file. - Adding TypeScript to React project
- Keep getting "Proxy error: Could not proxy request" error after adding proxy to react package.json
- Express Static files on server not loading correctly but React Front end is loading correctly?
- SCSS files not compiling to CSS in react using Webpack
- React app showing page with "404 the requested path could not be found" when using Apache
- Component files not importing in webpack react project?
- could not create react project
- Unhandled Rejection (Error): Could not load settings for 'WebPortal' - ASP.NET Core React
- Express not serving static files correctly for react build
- Babel will not compile .test.js files while running Jest
- getting error : Could not find a declaration file for module 'react-bootstrap-modal'. in react js
More Query from same tag
- how to optimize if both premitive and reference types in child component?
- I have issue with React forms when I try to post form with file type input
- Gulp, Uncaught SyntaxError: Unexpected token <
- React Native : expected dynamic type 'string' but had type 'object'
- passing js string literal with html into component and retain html
- Is React's setState() guaranteed to create a new state object every time?
- Encapsulation with React child components
- how can i update state to assign the value of readAsDataURL.result?
- Jest Enzyme how to shallow test for existence of wrapped component
- React useEffect and return render
- Implementing Material-UI Table on a class component with custom pagination actions
- How to read appsettings.json file using webpack.config or tsconfig.json in .net-core react redux project?
- Align next to each other in <View/> react native
- How do access Redux state in react-router ProtectedRoute?
- Finding the value of a Component clicked in React
- Page-layout -> getPrintArea() in office-JS is returning blank Object
- Change Parent Component State from Child functional component in React
- React Conditional Renderings with states
- How to display objects without duplicate headers?
- React + fetch request
- React + Jest check component contains another component
- Why my redux state always return with default case?
- Connect component to redux and multiple libraries during export
- DELETE user Express side works, but can't make it work on front-end side (using React)
- Action Reducer function not being called
- Problems with authentication flow in firebase app - after login, active user initially returns as null
- How to access DOM event-handlers for JSX-components in server-sided React
- How to modify material UI datagrid checkbox icon?
- How to use React context on search input and share the input with other components?
- Using useEffect cleanup function to store form values in localStorage