CentreForDigitalHumanities / cookiecutter-webapp-deluxe

BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

Angular cli.packageManager config override silently fails under incorrect assumptions #19

Open jgonggrijp opened 4 years ago

jgonggrijp commented 4 years ago

Since the Angular transition, the post-generation hook starts with the following steps by default:

yarn install --ignore-scripts

yarn ng new dighum-pro --prefix=dh --skipGit=true --skipInstall=true --style=scss --routing=true

cd frontend ; yarn ng config cli.packageManager yarn

While the third step is meant to use a locally installed ng, it fails unless ng is installed globally. This is due to the frontend dependencies not having been installed yet. The yarn fyarn command, which currently comes after it, should come before it.

In my case, despite the fact that the config override command failed, subsequent steps simply continued to run, leading to an incorrect configuration being included in the first commit. See also #17.

ar-jan commented 2 years ago

Were there any other specifics in triggering this? For me frontend dependencies did get installed correctly without having ng installed globally.

jgonggrijp commented 2 years ago

I don't remember, but it might have been fixed in the meanwhile. If ng is now installed in the root directory instead of in the frontend directory, or if yarn fyarn is now invoked before yarn ng config, that would explain the difference.