Closed fadeev closed 2 years ago
I could not reproduce the vue/package.json: no such file or directory
but there is another issue with the config:
client:
vuex:
path: "vue/src/store"
When the typescript
config is removed with an error message similar to:
Rel: can't make relative to /home/user/app/vue
If you have the following in
config.yml
:client: typescript: path: "ts-client" vuex: path: "vue/src/store"
And try scaffolding a message:
ignite s message create-foo bar
It will fail with
vue/package.json: no such file or directory
.Removing the
client
fromconfig.yml
fixes the issue.
My guess at what happens:
When the ts-client is generated, it is generated as a package.....For our vue frontend to work, that package must be depended on in the vue template's package.json so when we generate it , we write that dependency entry.
Any scaffolding action triggers a client generation but user may not have scaffoled a vue frontend.
TL;DR @jeronimoalbi we should basically check for the existence of vue/
and vue/package.json
before attempting to edit it.
@clockworkgr I verified and the package.json
will only be modified by updateVueDependencies() to link to the ts-client
directory when the generate vuex
command is executed. Only in that case, so the package.json
file should be already in the vue app directory at that point.
@clockworkgr I verified and the
package.json
will only be modified by updateVueDependencies() to link to thets-client
directory when thegenerate vuex
command is executed. Only in that case, so thepackage.json
file should be already in the vue app directory at that point.
not necessarily... user may have previously deleted vue/ or not scaffolded the vue app... vue/package.json is ensured by scaffolding the vue app...not by generate vuex
Someone may be generating the vuex stores for use on their own custom vue frontend. Hence an existence test to avoid such errors would be good...
If you have the following in
config.yml
:And try scaffolding a message:
It will fail with
vue/package.json: no such file or directory
.Removing the
client
fromconfig.yml
fixes the issue.