小编big*_*eel的帖子

在src目录中创建React App(TypeScript)自动生成react-app-env.d.ts

内容:

我只是将一个应用从移植create-react-app-typescriptcreate-react-app。在结构相同但不同的应用程序中,我执行了相同的步骤。

脚步:

npm uninstall react-scripts-ts
npm install react-scripts
npm install --save typescript @types/node @types/react @types/react-dom @types/jest
Run Code Online (Sandbox Code Playgroud)

详细步骤

第二个应用程序特有的问题:

  • Type error: Cannot compile namespaces when the '--isolatedModules' flag is provided. TS1208
  • Generated file src/react-app-env.d.ts

Assumption:

The generated file src/react-app-env.d.ts causes the --isolatedModules error.

Actual Question:

How do I prevent react-scripts from generating the src/react-app-env.d.ts file upon react-scripts start?

typescript create-react-app

8
推荐指数
2
解决办法
5283
查看次数

addSbtPlugin(...)导致驱逐警告,但'evicted'命令不显示任何内容

使用sbt 1.2.7和sbt-pgp插件,sbt显示驱逐警告.

$ rm -rf target project/target && sbt ";clean;compile"
[info] Loading global plugins from /home/kbigwheel/.sbt/1.0/plugins
[info] Loading project definition from /home/kbigwheel/code/_investigation/2019-01-04-evicted-warning-investigation-3/plugins/project/project
[info] Loading settings for project plugins-build from test.sbt ...
[info] Loading project definition from /home/kbigwheel/code/_investigation/2019-01-04-evicted-warning-investigation-3/plugins/project
[info] Updating ProjectRef(uri("file:/home/kbigwheel/code/_investigation/2019-01-04-evicted-warning-investigation-3/plugins/project/"), "plugins-build")...
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[info] Loading settings for project plugins from build.sbt ...
[info] Set current project to plugins (in build file:/home/kbigwheel/code/_investigation/2019-01-04-evicted-warning-investigation-3/plugins/) …
Run Code Online (Sandbox Code Playgroud)

scala sbt

7
推荐指数
1
解决办法
474
查看次数

标签 统计

create-react-app ×1

sbt ×1

scala ×1

typescript ×1