Peer dependencies for manual updates

Whenever I update Ghost manually I get the following warnings:

npm WARN react-stripe-elements@2.0.3 requires a peer of react@^15.5.
4 || ^16.0.0-0 but none is installed. You must install peer dependen
cies yourself.
npm WARN react-stripe-elements@2.0.3 requires a peer of react-dom@^1
5.5.4 || ^16.0.0-0 but none is installed. You must install peer depe
ndencies yourself.
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none i
s installed. You must install peer dependencies yourself.

This doesn’t stop Ghost from working but feels like an uncomplete installation. Is there anything I could or should do?
I am using this script for updating because my hoster doesn’t allow ghost-cli: https://www.peleke.de/ghost-2-auf-uberspace-7-per-tastendruck-aktualisieren/

The errors you’re seeing come up because one of Ghost’s components uses preact (rather than react).

If you have yarn installed, you should use it to install Ghost dependencies. Since Ghost is an application (and not a dependency), the lockfile should get rid of the ajv issue you’re seeing.

Thanks for the quick reply.
Your suggestion is to use yarn instead of

npm install --production

Is that correct?
Could there be any conflict if I switch to yarn now after I have used npm already very often?
Thanks in advance.

Update: After some investigation I just tried it and it worked similarly as with npm:

yarn install v1.16.0
[1/5] Validating package.json…
warning ghost@2.25.1: The engine “cli” appears to be invalid.
[2/5] Resolving packages…
[3/5] Fetching packages…
[4/5] Linking dependencies…
warning "@tryghost/members-auth-pages > react-stripe-elements@2.0.3
" has unmet peer dependency “react@^15.5.4 || ^16.0.0-0”.
warning "@tryghost/members-auth-pages > react-stripe-elements@2.0.3
" has unmet peer dependency “react-dom@^15.5.4 || ^16.0.0-0”.
[5/5] Building fresh packages…
$ cpy node_modules/@tryghost/members-theme-bindings/build/members-t
heme-bindings.js core/server/public/
Done in 51.76s.

Yep, as you can see, the ajv warning is gone. The react warning won’t go away unfortunately.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.