yarn start: 'tsc' is not recognized as an internal or external command
Describe the bug
Project does not start due to tsc not being present.
To Reproduce
- Fork repo
- Run
yarn - Run
yarn start
Expected behavior
Success output.
Screenshots

Desktop (please complete the following information):
- OS: Windows 10 Home
- Browser N/A
- Version No version present in intuit/design-systems-cli
If you want to add this to hacktoberfest I can try and submit a PR for the fix.
Go for it
@hipstersmoothie which approach do you prefer?
-
Assume TypeScript is installed on user's machine: add something to the README explaining this assumption and instructions on how to install TS.
-
Add
typescriptto thepackage.json?
Add
typescriptto thepackage.json?
It's already declared as a dependency: https://github.com/intuit/design-systems-cli/blob/master/package.json#L46
Add
typescriptto thepackage.json?It's already declared as a dependency: https://github.com/intuit/design-systems-cli/blob/master/package.json#L46
Why is tsc not included?
Maybe a windows thing? Potentially a npm/node versioning issue?
I just tried a clean clone of the repo and did yarn and yarn start without issue -- but i'm on a macbook. If you're able to diagnose the problem, i'd be curious to know what the underlying issue is.
I would like to work on this issue, I can test the solution in both platforms
I have tested this on Windows 10 Home / Pro, Mac and Linux (Ubuntu), everything is running fine for me, no errors following the indicated steps.
I have tested this on Windows 10 Home / Pro, Mac and Linux (Ubuntu), everything is running fine for me, no errors following the indicated steps.
Ok interesting. I'm using a fresh Windows after adding all new hardware. I'm going to start digging into this issue this week.
I have tested this on Windows 10 Home / Pro, Mac and Linux (Ubuntu), everything is running fine for me, no errors following the indicated steps.
What happens if you type tsc in your Windows terminal? Also, which Windows terminal are you using? PowerShell? bash?
Just an update that I also can reproduce the same error on my work Mac

@hipstersmoothie can confirm that installing TypeScript locally is what corrects this error.
Can I PR in a README change to help new users make sure they have the pre-requisite software installed as global libraries on their machine before they use the design systems cli?
I don't have typescript installed locally, I'm not seeing the error, and it shouldn't be a pre-requisite, one possible solution could be rather that using the tsc alone, you can use the path to local executable ./node_modules/.bin/tsc.
I'm using zsh as my shell interpreter in Mac, Linux and Windows
you can use the path to local executable
./node_modules/.bin/tsc.
Any hard-coded path implies an OS (windows has the opposite path separators). I would expect a lot of this to be handled by yarn internally. Could it be a yarn issue? What version are you using? Does it behave the same if you use node start instead of yarn start?
I don't have
typescriptinstalled locally, I'm not seeing the error, and it shouldn't be a pre-requisite, one possible solution could be rather that using thetscalone, you can use the path to local executable./node_modules/.bin/tsc.I'm using
zshas my shell interpreter in Mac, Linux and Windows
I get no node_modules after running yarn or yarn install
I get no node_modules after running yarn or yarn install
That seems like the underlying problem. Are you on yarn-v1 or yarn-v2?
I get no node_modules after running yarn or yarn install
That seems like the underlying problem. Are you on yarn-v1 or yarn-v2?
version 1.22.5
I don't have
typescriptinstalled locally, I'm not seeing the error, and it shouldn't be a pre-requisite, one possible solution could be rather that using thetscalone, you can use the path to local executable./node_modules/.bin/tsc. I'm usingzshas my shell interpreter in Mac, Linux and WindowsI get no node_modules after running
yarnoryarn install
That's exactly the reason because tsc is not working for you.
I'm using [email protected], [email protected] and [email protected], everything working without any issue
@jasonrundell I can see the following line in your terminal output:
that mean that you're getting an error installing the modules, you should upgrade your node version to at least 10.18.1, and that could be the minimum required version, this could be added to the readme.
I feel that if you upgrade you will not have any problem again.
Upgraded to node version v12.18.4 and yarn install finished node_modules download.
yarn start looks to be working correctly...
[4:48:11 PM] Starting compilation in watch mode...
[4:49:22 PM] Found 0 errors. Watching for file changes.
Ok, so should the README declare the minimum version of node to be 10.18.1?
You could just add the engines section to the package.json that will show an error to the users if they are using a different version and will suggest which one should be used
"engines": {
"node": ">=10.18.1"
}
Along with that a badge with the expected node version can be added to the README.