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

Synthetics init fails because templates weren't included in distributable #509

Closed
lucasfcosta opened this issue May 24, 2022 · 3 comments · Fixed by #510
Closed

Synthetics init fails because templates weren't included in distributable #509

lucasfcosta opened this issue May 24, 2022 · 3 comments · Fixed by #510
Assignees
Labels
bug Something isn't working

Comments

@lucasfcosta
Copy link
Contributor

Summary

Right now, the synthetics init command fails because the templates folder is lacking files. If you build the package locally it runs fine because the templates will be copied, but if you use npx, for example, you will see the following error:

Error: ENOENT: no such file or directory, open '/Users/lucasfcosta/.npm/_npx/XYZ/node_modules/@elastic/synthetics/templates/.gitignore'

How to reproduce

  1. Run npx @elastic/synthetics init my-project
@vigneshshanmugam
Copy link
Member

How did you try the init command?

Interesting, I made sure the templates folder is published -

synthetics/package.json

Lines 23 to 27 in 5c31e15

"files": [
"dist",
"src",
"templates"
],

@vigneshshanmugam
Copy link
Member

Figured out the issue, .gitignore files are ignored by NPM by default. Will change the strategy here.

@emilioalvap
Copy link
Contributor

PostFF LGTM.

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

Successfully merging a pull request may close this issue.

3 participants