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

Adds @foal/cli to package.json templates #1109

Merged
merged 1 commit into from
Jul 29, 2022
Merged

Adds @foal/cli to package.json templates #1109

merged 1 commit into from
Jul 29, 2022

Conversation

scho-to
Copy link
Contributor

@scho-to scho-to commented Jul 27, 2022

Issue

  • When running the 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.

  • But when deploying to a PaaS provider (such a Heroku), the command fails because the CLI has not been installed globally. Only dependencies specified in package.json are installed.

Solution and steps

Added the @foal/cli of version 2.9.0 to the package.json templates in the folders:

  • \packages\cli\src\generate\templates\app
  • \packages\cli\src\generate\specs\app

To test this, set up the environment as stated in the Contributing Guidelines. You don't have to setup the Database, so skip the docker-start command.

  1. After setup, go to the folder "packages\cli\lib"
  2. run the following command:
    node index.js createapp -G -I testApp
  3. go into the new folder "testApp":
    cd ./testApp
  4. Check the generated package.json. There now is the @foal/cli

Checklist

  • [?] Add/update/check docs (code comments and docs/ folder).
    No need to update the docs.
  • Add/update/check tests.
    Test ran successfully
  • Update/check the cli generators.
    Generation checked using the index.js file inside the "packages\cli\lib" folder.

@scho-to
Copy link
Contributor Author

scho-to commented Jul 27, 2022

Fixes issue #1097

@scho-to scho-to changed the title Adds @foal/cli to package.json templates - fixes #1097 Adds @foal/cli to package.json templates Jul 27, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jul 28, 2022

Codecov Report

Merging #1109 (cb09da9) into master (8daaf31) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1109   +/-   ##
=======================================
  Coverage   98.93%   98.93%           
=======================================
  Files          86       86           
  Lines        1698     1698           
  Branches      406      406           
=======================================
  Hits         1680     1680           
  Misses         18       18           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8daaf31...cb09da9. Read the comment docs.

Copy link
Member

@LoicPoullain LoicPoullain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@LoicPoullain LoicPoullain changed the base branch from master to v3-0-0 July 28, 2022 12:20
@LoicPoullain LoicPoullain changed the base branch from v3-0-0 to master July 28, 2022 12:21
@LoicPoullain LoicPoullain changed the base branch from master to v2-10-0 July 29, 2022 05:26
@LoicPoullain LoicPoullain merged commit 59aba80 into FoalTS:v2-10-0 Jul 29, 2022
This was referenced Jul 29, 2022
@francelwebdev
Copy link
Contributor

Hi @LoicPoullain ,
In some cloud provider, the packages inside devDependencies are not installed, so I get : foal: not found .
You should add the @foal/cli inside dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants