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

npx tsdx create fails with 0.10 #255

Closed
ArnaudBarre opened this issue Oct 15, 2019 · 4 comments · Fixed by #261
Closed

npx tsdx create fails with 0.10 #255

ArnaudBarre opened this issue Oct 15, 2019 · 4 comments · Fixed by #261

Comments

@ArnaudBarre
Copy link
Contributor

Current Behavior

npx tsdx create mylib fails (before template prompt)

Expected behavior

npx tsdx create mylib works

Suggested solution(s)

npx tsdx@0.9 create mylib

Your environment

Software Version(s)
TSDX 0.10
TypeScript not installed globally
npm/Yarn yarn 1.19, npm 6.12
Operating System macOS
@xogeny
Copy link

xogeny commented Oct 15, 2019

I think I've having the same issue. Easy way to reproduce, for me, was to run:

$ docker run -it node
# npx tsdx create mylib

But I also get the same error running npx tsdx create mylib under Windows (Cannot find module 'typescript').

If, instead, I run yarn add tsdx so that it is installed locally in a package I get the error message: warning " > tsdx@0.10.0" has unmet peer dependency "typescript@3".. The result is that if, from that repo where tsdx is installed locally, I do npx tsdx create ../foo, I again get Cannot find module 'typescript'.

However, doing yarn add typescript tsdx and then running npx tsdx create ../foo it then runs.

Bottom line, it seems that having typescript as a peer dependency is not a good idea for something to be run via npx. I suspect it was globally installed during testing or something which is how this was missed.

@mdapper
Copy link

mdapper commented Oct 16, 2019

Same error here:

$ npx tsdx create tsdx-demo
Cannot find module 'typescript'
Software Version(s)
TSDX 0.10
TypeScript not installed globally
Yarn 1.19.1
npm 6.9.0
node 10.16.3
OS Ubuntu 18.04

Using npx tsdx@0.9 create tsdx-demo worked.

@Weffe
Copy link

Weffe commented Oct 16, 2019

I am having the same issue with getting the error Cannot find module 'typescript' when trying to run with v0.10

@jaredpalmer
Copy link
Owner

Thanks for the reports. on it.

@agilgur5 agilgur5 added kind: bug Something isn't working kind: regression and removed kind: bug Something isn't working labels Sep 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants