Closed LoicPoullain closed 2 years ago
Hi @LoicPoullain,
i would like to take this as my first ever github issue. In my Job i use gitlab and jira as ticket management.
I would like to improve my knowledge by taking this task.
However, I am not sure how to test this afterwards, as I dont have any cloud providers privately. I try to reproduce the issue in a local docker Container.
I also have some question: The issue says, that it "often fails". When does it not fail? So it should not fail, If the cli is installed either locally or globally.
Hi @scho-to 👋
Thank you for taking care of this issue.
You don't need to have a Cloud provider account or to set up a Docker container for this issue.
The only thing that you have to do is to update the package.json
templates that are used to create a new application (i.e. when running the command foal createapp
). These templates must include @foal/cli
as devDependency.
For this, you need to:
.github/CONTRIBUTING.md
. You can skip the Docker and database steps as we don't need them here (no db to set up). packages/cli
, you will be able to run the tests to test your changes. There are two types of files to update: the templates and the "spec files" that check that the templates are rendered as expected (see issue description).To give more details on the issue, here's the problem that we often face:
npm run build
command locally, the foal
binary is found because we have previously installed it globally using npm install -g @foal/cli
. So the command works.package.json
are installed.Hey @LoicPoullain ,
could you create a new branch for this issue? I have it fixed and tested on my local branch, I need a branch to commit the changes to :)
@scho-to did you create a fork of the repository? You will need it to be able to submit a PR. The branch will be created on your side in the fork.
https://docs.github.com/en/get-started/quickstart/fork-a-repo
Hey @LoicPoullain ,
i created a pull request for this issue: https://github.com/FoalTS/foal/pull/1109
Feature added in v2.10.0. Thank you 👍
Issue
When deploying an application to a Cloud provider, the build often fails with the error
foal not found
because the CLI dependency is not found. When developing the app in local, it is installed as global dependency withnpm install -g @foal/cli
.Solution
Include the CLI as project dev dependency when creating the app.
Files to update:
packages/cli/src/generate/templates/app
packages/cli/src/generate/specs/app