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

Createapp CLI works on windows, but not linux #1022

Closed
haneefkassam opened this issue Jan 8, 2022 · 7 comments
Closed

Createapp CLI works on windows, but not linux #1022

haneefkassam opened this issue Jan 8, 2022 · 7 comments
Labels

Comments

@haneefkassam
Copy link

Version of FoalTS: 2.7.1
OS: Ubuntu 20.04/ZorinOS 16
Node: 16.13.1 (via snap)

I have been trying to set up my Linux VM (have tried on ubuntu 20.04 and ZorinOS 16) for foalTS development and am running into an issue. The CLI foal createapp command doesn't throw any error (other than mentioning that "Initialization of git failed". This happens on windows as well). I have made 0 changes the base app.

image

However, when I try to run the app, it always fails with exit code 1

image

I've installed build-essential, gcc. On windows, the console clears and the app starts.

I can run node build/index.js and it'll start the app (but I don't get the benefits of the supervisor build).

Edit: I figured it out. turns out if I add --raw to the package.json file for the develop script, it works fine (note, this is only needed on linux, but doesn't affect the functionality of the app on windows). The develop script would then look like this (only showing relevant part of package.json):

{
    "scripts": {
        "develop": "npm run build && concurrently --raw \"tsc -p tsconfig.app.json -w\" \"supervisor -w ./build,./config -e js,json,yml --no-restart-on error ./build/index.js\"",
    }
}
@kingdun3284
Copy link
Member

This should be the issue linking with #1023. It's caused by foal-cli using color js as a dependency. Simply add "colors": "1.4.0", to your dependency may solve your problem temporarily.

@haneefkassam
Copy link
Author

This should be the issue linking with #1023. It's caused by foal-cli using color js as a dependency. Simply add "colors": "1.4.0", to your dependency may solve your problem temporarily.

Unfortunately this did not work (I did not try a fresh install/create of my app, but I did try globally installing the 1.4.0 version of colors with no luck).

@kingdun3284
Copy link
Member

This should be the issue linking with #1023. It's caused by foal-cli using color js as a dependency. Simply add "colors": "1.4.0", to your dependency may solve your problem temporarily.

Unfortunately this did not work (I did not try a fresh install/create of my app, but I did try globally installing the 1.4.0 version of colors with no luck).

Okay, then this should be another bug. Sometimes, there are some errors will be omitted if you are not adding the -r flag of supervisor.

@LoicPoullain
Copy link
Member

LoicPoullain commented Jan 10, 2022

Hello @haneefkassam 👋

Could you confirm that in your package-lock.json this time, the version of colors is 1.4.0? We also released a new patch one hour ago. Could you try to run the following commands and tell us if it works with a new project? Thanks

npm i -g @foal/cli@2.7.2
foal createapp my-app

@haneefkassam
Copy link
Author

Hi @LoicPoullain

The version of colors in my project's package-lock.json is 1.4.0. Confirmed.

I tried running the command you mentioned, but run into the same problem (which is resolved by adding the --raw flag to the concurrently command in package.json.

@haneefkassam
Copy link
Author

Looks like this also affects the test script in the package.json (and I guess any of the scripts that leverage the concurrently package.

@LoicPoullain
Copy link
Member

Fixed in v2.10

Issue tracking automation moved this from Backlog to Done / Closed This Release Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Issue tracking
  
Done / Closed This Release
Development

No branches or pull requests

3 participants