ts-jest[versions] (WARN) Version 23.6.0 of jest installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=24.0.0 <25.0.0). Please do not report issues in ts-jest if you are using unsupported versions. 想用
npm WARN deprecated react-scripts@2.0.0: This release contains bugs. Please update to react-scripts@2.0.3 instead. 项目版本
好像拥有想拥有 jest24,
creat-react-app项目,eject不被推荐
从2.0.0迁移到3.0.0
"babel-loader": "^8.0.5" 删除 react-scripts中内置,
-----第一次run start 强制改写tsconfig.json
The following changes are being made to your tsconfig.json file:
- compilerOptions.strict to be suggested value: true (this can be changed)
- compilerOptions.forceConsistentCasingInFileNames to be suggested value: true (this can be changed)
- compilerOptions.resolveJsonModule must be true (to match webpack loader)
- compilerOptions.isolatedModules must be true (implementation limitation)
- compilerOptions.noEmit must be true
- compilerOptions.jsx must be preserve (JSX is compiled by Babel)
- compilerOptions.paths must not be set (aliased imports are not supported)
paths别名后面放到webpack中处理
"strict": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true
tsconfigi.json被重写 webpack需要重写适应
Html Webpack Plugin: Error: Child compilation failed: Module not found: Error: Can't resolve 'babel-loader' in 'E:\open-api-bank-all\op en-api-bank-3.0z': Error: Can't resolve 'babel-loader' in 'E:\open-api-bank-all\open-api-bank-3.0z' Module not found: Error: Can't resolve 'babel-loader' in 'E:\open-api-bank-all\op en-api-bank-3.0z': Error: Can't resolve 'babel-loader' in 'E:\open-api-bank-all\open-api-bank-3.0z'
webpack中引用react-scripts中的依赖需要用绝对路径???
Error: Plugin/Preset files are not allowed to export objects, only functions. In E:\open-api-bank-all\open-api-bank-3.0z\node_modules\babel-preset-es2015\lib\index.js
babel-loader 需要降级????
./src/312/index.js SyntaxError: E:\open-api-bank-all\open-api-bank-3.0z\src\312\index.js: Unexpected token, expected "," (26:18)
24 | FastClick.attach(document.body);
25 | ReactDOM.render(
> 26 | <Provider store={stores}>
| ^
27 | <AppContainer>
28 | <Component/>
29 | </AppContainer>
卧槽!!!打扰了...我溜了eject我来了...
也不eject了,先溜了有缘再会,告辞