Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsconfig.json is not created after running npx create-react-app --scripts-version @react-workspaces/react-scripts --template typescript #20

Open
ivankoleda opened this issue Mar 8, 2020 · 0 comments

Comments

@ivankoleda
Copy link

Which terms did you search for in User Guide?

According to CRA doc: https://create-react-app.dev/docs/adding-typescript/#getting-started-with-typescript-and-react tsconfig.json will be created automatically

Running script form this section https://github.com/react-workspaces/react-workspaces-playground#creating-a-new-cra-app does not create it

Expected behavior

running npx create-react-app --scripts-version @react-workspaces/react-scripts --template typescript shared should create tsconfig.json file in root folder

Actual behavior

npx create-react-app --scripts-version @react-workspaces/react-scripts --template typescript shared

tsconfig.json has not beed created

Screen Shot 2020-03-06 at 20 05 21

This message is absent in following output, however it is present while using default react-scripts

We detected TypeScript in your project (src/App.test.tsx) and created a tsconfig.json file for you. Your tsconfig.json has been populated with default values.

output

npx: installed 99 in 7.186s

Creating a new React app in /Users/ivan/projects/monorepo/workspace-no-es5/packages/shared.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and @react-workspaces/react-scripts with cra-template-typescript...

yarn add v1.15.2
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
warning Pattern ["react@16.13.0"] is trying to unpack in the same destination "/Users/ivan/Library/Caches/Yarn/v4/npm-react-16.13.0-d046eabcdf64e457bbeed1e792e235e1b9934cf7/node_modules/react" as pattern ["react@^16.13.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["react-dom@16.13.0"] is trying to unpack in the same destination "/Users/ivan/Library/Caches/Yarn/v4/npm-react-dom-16.13.0-cdde54b48eb9e8a0ca1b3dc9943d9bb409b81866/node_modules/react-dom" as pattern ["react-dom@^16.13.0"]. This could result in non-deterministic behavior, skipping.
[3/4] 🔗 Linking dependencies...
warning "workspace-aggregator-0bcca8c9-25ac-45a2-b068-d4557dfa6570 > web > @react-workspaces/react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
warning Your current version of Yarn is out of date. The latest version is "1.22.1", while you're on "1.15.2".
info To upgrade, run the following command:
$ brew upgrade yarn
success Saved 4 new dependencies.
info Direct dependencies
info All dependencies
├─ @react-workspaces/react-scripts@3.3.0-alpha-08
├─ cra-template-typescript@1.0.2
├─ react-dom@16.13.0
└─ react@16.13.0
✨ Done in 21.48s.
Removing template package using yarnpkg...

yarn remove v1.15.2
[1/2] 🗑 Removing module cra-template-typescript...
[2/2] 🔨 Regenerating lockfile and installing missing dependencies...
warning "workspace-aggregator-fd2495c5-560c-41a6-aec9-54235e0c6177 > shared > @react-workspaces/react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
success Uninstalled packages.
✨ Done in 9.47s.

Initialized a git repository.

Success! Created shared at /Users/ivan/projects/monorepo/workspace-no-es5/packages/shared
Inside that directory, you can run several commands:

yarn start
Starts the development server.

yarn build
Bundles the app into static files for production.

yarn test
Starts the test runner.

yarn eject
Removes this tool and copies build dependencies, configuration files
and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

cd shared
yarn start

Happy hacking!

npx create-react-app --template typescript shared-copy

tsconfig.json has been fcreated

Screen Shot 2020-03-06 at 20 05 16

output

npx: installed 99 in 8.969s

Creating a new React app in /Users/ivan/projects/monorepo/workspace-no-es5/shared-copy.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template-typescript...

yarn add v1.15.2
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "react-scripts > eslint-config-react-app@5.2.0" has incorrect peer dependency "eslint-plugin-flowtype@3.x".
warning "react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
success Saved 9 new dependencies.
info Direct dependencies
├─ cra-template-typescript@1.0.2
├─ react-dom@16.13.0
├─ react-scripts@3.4.0
└─ react@16.13.0
info All dependencies
├─ cra-template-typescript@1.0.2
├─ is-docker@2.0.0
├─ open@7.0.2
├─ react-dev-utils@10.2.0
├─ react-dom@16.13.0
├─ react-error-overlay@6.0.6
├─ react-scripts@3.4.0
├─ react@16.13.0
└─ scheduler@0.19.0
✨ Done in 17.98s.

Initialized a git repository.

Installing template dependencies using yarnpkg...
yarn add v1.15.2
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "react-scripts > eslint-config-react-app@5.2.0" has incorrect peer dependency "eslint-plugin-flowtype@3.x".
warning " > @testing-library/user-event@7.2.1" has unmet peer dependency "@testing-library/dom@>=5".
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
success Saved 25 new dependencies.
info Direct dependencies
├─ @testing-library/jest-dom@4.2.4
├─ @testing-library/react@9.5.0
├─ @testing-library/user-event@7.2.1
├─ @types/jest@24.9.1
├─ @types/node@12.12.29
├─ @types/react-dom@16.9.5
├─ @types/react@16.9.23
├─ react-dom@16.13.0
├─ react@16.13.0
└─ typescript@3.7.5
info All dependencies
├─ @babel/runtime-corejs3@7.8.7
├─ @sheerun/mutationobserver-shim@0.3.2
├─ @testing-library/dom@6.15.0
├─ @testing-library/jest-dom@4.2.4
├─ @testing-library/react@9.5.0
├─ @testing-library/user-event@7.2.1
├─ @types/color-name@1.1.1
├─ @types/jest@24.9.1
├─ @types/node@12.12.29
├─ @types/prop-types@15.7.3
├─ @types/react-dom@16.9.5
├─ @types/react@16.9.23
├─ @types/testing-library__dom@6.12.1
├─ @types/testing-library__react@9.1.3
├─ core-js-pure@3.6.4
├─ css.escape@1.5.1
├─ csstype@2.6.9
├─ dom-accessibility-api@0.3.0
├─ min-indent@1.0.0
├─ react-dom@16.13.0
├─ react@16.13.0
├─ redent@3.0.0
├─ strip-indent@3.0.0
├─ typescript@3.7.5
└─ wait-for-expect@3.0.2
✨ Done in 11.80s.

We detected TypeScript in your project (src/App.test.tsx) and created a tsconfig.json file for you.

Your tsconfig.json has been populated with default values.

Removing template package using yarnpkg...

yarn remove v1.15.2
[1/2] 🗑 Removing module cra-template-typescript...
[2/2] 🔨 Regenerating lockfile and installing missing dependencies...
warning " > @testing-library/user-event@7.2.1" has unmet peer dependency "@testing-library/dom@>=5".
warning "react-scripts > eslint-config-react-app@5.2.0" has incorrect peer dependency "eslint-plugin-flowtype@3.x".
success Uninstalled packages.
✨ Done in 16.67s.

Created git commit.

Success! Created shared-copy at /Users/ivan/projects/monorepo/workspace-no-es5/shared-copy
Inside that directory, you can run several commands:

yarn start
Starts the development server.

yarn build
Bundles the app into static files for production.

yarn test
Starts the test runner.

yarn eject
Removes this tool and copies build dependencies, configuration files
and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

cd shared-copy
yarn start

Happy hacking!

Seem like checking happens in this function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant