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

Mistakenly identifying projects as typescript based on extra node_modules #6235

Closed
paulbiba opened this issue Jan 19, 2019 · 1 comment
Closed
Assignees
Milestone

Comments

@paulbiba
Copy link

Is this a bug report?

Yes

Did you try recovering your dependencies?

$ npm --version
6.4.1

Which terms did you search for in User Guide?

I Googled the error message.

Environment

Environment Info:

System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Binaries:
Node: 8.0.0 - ~/.nvm/versions/node/v8.0.0/bin/node
Yarn: 1.12.3 - ~/.nvm/versions/node/v8.0.0/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v8.0.0/bin/npm
Browsers:
Chrome: 71.0.3578.98
Firefox: 64.0
Safari: 12.0.2
npmPackages:
react: ^16.6.3 => 16.7.0
react-dom: ^16.6.3 => 16.7.0
react-scripts: ^2.1.3 => 2.1.3
npmGlobalPackages:
create-react-app: Not Found

Steps to Reproduce

(Write your steps here:)

My problem has already been documented clearly, but the ticket was closed with no workaround documented or described. I don't understand what I'm supposed to do.

#5669

Expected Behavior

I did not expect an error message. I did expect to be able to continue to work on my app without reorganizing my project to remove the extra node_modules directory.

Actual Behavior

$ npm start

[email protected] start /path/to/my/project
react-scripts start

We detected TypeScript in your project (subdirectory/subdirectory/node_modules/array-flatten/array-flatten.d.ts) and created a tsconfig.json file for you.

Could not parse tsconfig.json. Please make sure it contains syntactically correct JSON.
Details: error TS18003: No inputs were found in config file 'tsconfig.json'. Specified 'include' paths were '["**/*"]' and 'exclude' paths were '[]'.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: react-scripts start
npm ERR! Exit status 1

@mrmckeb
Copy link
Contributor

mrmckeb commented Jan 20, 2019

HI @paulbiba, sorry you've hit this issue.

I think this was resolved with:
#6022

The plan is to release this with v2.1.4. In the mean time, you could try this -

  1. Go into your node_modules folder.
  2. Go to react-scripts/scripts/utils/verifyTypeScriptSetup.js
  3. Copy the changes from here: https://github.com/facebook/create-react-app/blob/fc75002ca3746a61b1e7d28c89ea47bf4245640c/packages/react-scripts/scripts/utils/verifyTypeScriptSetup.js

Then try restarting, and see if that works. If it does or doesn't, please let me know ASAP :)

@mrmckeb mrmckeb self-assigned this Jan 20, 2019
@Timer Timer added this to the 2.1.4 milestone Jan 20, 2019
@ianschmitz ianschmitz modified the milestones: 2.1.4, 2.1.5 Feb 10, 2019
@iansu iansu modified the milestones: 2.1.6, 2.1.x, 3.x Mar 6, 2019
@lock lock bot locked and limited conversation to collaborators Oct 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants