我正在尝试在 tsx 文件中导入 jsx 文件。这导致了错误
错误 TS2604:JSX 元素类型“Test”没有任何构造或调用签名。
我使用 webpack , react, typescript, Import tsx files 没有问题,但是任何 jsx 文件都会导致编译错误,
包.json
{
"name": "typescript-babel-webpack",
"version": "1.0.0",
"description": "A simple lightweight TypeScript + Babel + Webpack project.",
"scripts": {
"build": "webpack"
},
"license": "",
"devDependencies": {
"babel-core": "^6.20.0",
"babel-loader": "^6.2.9",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.16.0",
"css-loader": "^0.26.1",
"inline-style-prefixer": "^2.0.4",
"react-style-proptype": "^1.4.0",
"style-loader": "^0.13.1",
"ts-loader": "^1.3.1",
"typescript": "^2.1.4",
"webpack": "^1.14.0",
"webpack-dev-server": "^1.16.2",
"@types/react": "^0.14.55",
"@types/react-dom": "^0.14.19"
},
"dependencies": {
"event-emitter-es6": "^1.1.5",
"inline-style-prefixer": …Run Code Online (Sandbox Code Playgroud) 我安装了JDK 8,当我输入cmd时java -version我得到1.8,浏览器在运行需要Java 1.8的applet时,它说JRE 1.8不可用,使用最新的JDK运行它.
当我在浏览器中检查插件时,所有指向JRE 7,Chrome和IE.在Java控制面板中,我看到列出了JDK 8.