Closed vladimiry closed 5 years ago
Indeed it's a bug, it should not try to get this version, it's a dev version (cf from).
You should have
"pt-formgenerator": {
"version": "github:ProtonMail/pt-formgenerator#7269be46a950f1458513ce1c259c1f92f17c1057",
"from": "github:ProtonMail/pt-formgenerator#semver:^1.4.0"
},
inside the lock, with this it works.
Edit: fix available :)
Thanks for a fast fix, I confirm npm ci
works now.
I have to reopen the issue since npm ci
should work on all the projects.
Status:
proton-contacts
: no lock fileproton-calendar
: no lock fileproton-mail-settings
: lock file exists, npm ci
test passedWebClient/tree/v4
: lock file exists, npm ci
test failed@dhoko, can you reopen? I don't see the respective button.
WebClient/tree/v4: lock file exists, npm ci test failed
:grimacing: I will update the file, we don't really maintain the lock for the v4 as it's a wip based on the latest version of v3 (without a tag for calendar, cntacts etc.) it's hard to maintain
Fair enough. But can I expect when v4 gets closer to the release state all the lock files will be valid and maintained? I still think the issue should be reopened at least for tracking purposes.
Yeah I will generate a new one + add something to sync it more often. Voilà, on WebClient/tree/v4 it's :ok:
Voilà, on WebClient/tree/v4 it's ok
npm ERR! cipm can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with
npm install
before continuing.
@vladimiry voilà, sorry :grimacing: Indeed we changed a major inside the dependencies and we didn't update the lock.
Btw, now to be able to install the v4 you need some variables inside the env/.env
PM_SETTINGS_GIT=git@github.com:ProtonMail/proton-mail-settings.git
CONTACTS_GIT=xxx
CALENDAR_GIT=xxxx
To inform the build script of the other applications.
Getting module missing error
ERROR in [copy-webpack-plugin] unable to locate 'node_modules/proton-translations' at '/home/vy/dev/_github/electron-mail/output/git/WebClient/4d751fc3ec902a33e14a81076292d14174047a6d/app.protonmail.ch/node_modules/proton-translations'
Should I remove { from: 'node_modules/proton-translations', to: 'i18n' },
record from CopyWebpackPlugin
instance settings (monkey patching)?
O_o you should not have an error. We create the directory when we install (as a hook postinstall)
Do you see this warning when you run $ npm ci
?
Post npm ci
I run npm run start:raw
and It works :thinking:
I tried with a new copy, it worked too
git clone git@github.com:ProtonMail/WebClient.git --depth 1 --branch v4 dodo
cd dodo
npm ci
npm start
edit: same, no error with a new copy for the branch public and v4
@vladimiry voilà, sorry grimacing
Can confirm, it's in sync now, thanks.
Do you see this warning when you run $ npm ci ?
I do but the empty node_modules/proton-translations
directory didn't get created, according to node_modules/proton-i18n/lib/postInstall.js
.
PS I removed { from: 'node_modules/proton-translations', to: 'i18n' }
from config by monkey patching the copy-webpack-plugin
and build seems to work now.
@vladimiry hum, weird.
PS instead of changing the config, you can create the directory node_modules/proton-translation
;)
Can you give me some informations about your env so I can try to generate the same issue ? OS, node -v, npm -v etc.Thx
PS instead of changing the config, you can create the directory node_modules/proton-translation ;)
Yeah, that's a simpler workaround.
Can you give me some informations about your env so I can try to generate the same issue ?
I think no need since it works if I run stuff manually in console but doesn't create that dir in automated workflow enabled in https://github.com/vladimiry/ElectronMail.
Another build issue placed here https://github.com/ProtonMail/proton-calendar/issues/2
Btw, now to be able to install the v4 you need some variables inside the env/.env
I got it built for me without tweaking env/.env
file. I see that checkEnv
bash function is being executed only if I pass --deploy-subproject=
-like arguments which I don't do.
Another build issue placed here ProtonMail/proton-calendar#2
Got the proton-calendar
from my cache but fresh build is impossible at the moment.
I think no need since it works if I run stuff manually in console but doesn't create that dir in automated workflow enabled in https://github.com/vladimiry/ElectronMail.
:thinking: where ? This is on a CI ? It's an issue if you don't have the empty directory, proton-i18n should create an empty one.
I fixed the calendar etc. It was out-of-date :/
thinking where ? This is on a CI ? It's an issue if you don't have the empty directory, proton-i18n should create an empty one.
It got worked around for now, here https://github.com/vladimiry/ElectronMail/blob/5494933871bac7b7aea48fd999447007c100cdb0/scripts/prepare-webclient/protonmail.ts#L112-L114
hahaha :rofl: that's a solution. But i would like to find a permanent solution via the hook when we install. We don't have the issue here :/
But i would like to find a permanent solution
Mee to, so I put TODO there. You know, if dev puts TODO somewhere it will be handled, one day ... :laughing:
@dhoko can you also sync lock file in proton-mail-settings
? It used to be synced but not anymore.
@vladimiry :heavy_check_mark: voilà
@vladimiry I created a patch for your issue https://github.com/ProtonMail/proton-i18n/pull/13 you install via npm ci, so the fix will be available with the new version. :)
Describe the bug
Can't install locked dependencies by running
npm ci
.To Reproduce Steps to reproduce the behavior:
git clone git@github.com:ProtonMail/WebClient.git && cd WebClient
npm ci
So apparently there is no fdcb732818fe377e89836edccd937204395969e5 commit anymore in github:ProtonMail/pt-formgenerator repository (probably force push happened):
Workaround
npm install
will work but it updates the lock file and dependencies versions which means the dependencies are not locked.