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

[Bug] = temporal-delivery-app initialization: Error: ENOENT: no such file or directory tsconfig.json #251

Closed
cliffordfajardo opened this issue Feb 7, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@cliffordfajardo
Copy link

What are you really trying to do?

I am attempting to follow the Temporal NodeJS delivery app guide from this blogpost: Building Reliable Distributed Systems in Node.js

Describe the bug

After running the first command specified in the tutorial, I am getting an error:

  ~/Repos/temporal-playgrounds npx @temporalio/create@latest --sample food-delivery
Need to install the following packages:
  @temporalio/create@latest
Ok to proceed? (y)
✔ What is your project named? … temporal-delivery-app-example
Creating a new Temporal project in /Users/cfajardo/Repos/temporal-playgrounds/temporal-delivery-app-example/

Downloading files for sample food-delivery. This might take a moment.

Installing packages. This might take a couple of minutes.

Aborting installation.
Unexpected error. Please report it as a bug:
[Error: ENOENT: no such file or directory, open '/Users/cfajardo/Repos/temporal-playgrounds/temporal-delivery-app-example/tsconfig.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/cfajardo/Repos/temporal-playgrounds/temporal-delivery-app-example/tsconfig.json'
}

Minimal Reproduction

1.Attempt to initialize the delivery app example using the following command used in the blog post:

npx @temporalio/create@latest --sample food-delivery

Environment/Versions

  • OS: Mac Ventura 13.2
  • NodeJS version 17.9.1
  • Temporal v1.6.0 typescript
  • Not using Docker or Kubernetes or building Temporal from source?

References

@cliffordfajardo cliffordfajardo added the bug Something isn't working label Feb 7, 2023
@cliffordfajardo cliffordfajardo changed the title [Bug] = temporal-delivery-app [Bug] = temporal-delivery-app initialization: Error: ENOENT: no such file or directory tsconfig.json Feb 7, 2023
@lorensr
Copy link
Contributor

lorensr commented Feb 8, 2023

Hey, thanks for reporting and including your Node version! I had only tested it in Node 16, but now I'm reproducing your error in 17 and 18. Looking into it now. In the meantime, Node 16 should work.

@jhubbardsf
Copy link

jhubbardsf commented Mar 30, 2023

@lorensr While this is fixed in the sdk-typescript repository it doesn't look like the @temporal/create package has been published in a long time. Last version (1.6.0) was published two months ago. I came across this same bug trying to create the monorepos sample after the webinar today.

@lorensr
Copy link
Contributor

lorensr commented Mar 30, 2023

Sorry about that! For now, you can clone this repo and cd into food-delivery

@jhubbardsf
Copy link

jhubbardsf commented Mar 30, 2023

I ended up cloning the sdk-typescript package and running the cli.js file from main because I was curious about the bug. Which led me to another thought. It appears the fix for it is to just ignore the error if tsconfig.json doesn't exist. But, for example in the monorepo-folders sample, it would need to check that packages folder and then do the node version replacing in each of them for that part of the code to work correctly (I had just skimmed it).

If the intent is to change the tsconfig/node16/tsconfig.json lines to be the version of node currently running.

@jhubbardsf
Copy link

@lorensr I opened a PR in the sdk-typescript repo that I think will fix the underlying issues and make the try/catch unnecessary.

@mjameswh
Copy link
Contributor

mjameswh commented Apr 4, 2023

Fixed in temporalio/sdk-typescript#1089. Thanks @jhubbardsf.

@mjameswh mjameswh closed this as completed Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants