I can confirm @XavierCaron’s assessment, though there are some gotchas that are easy to run into, here’s our current recipe:
- do not depend on
@forge/cliviapackage.json(we had it as a dev dependency, which worked up to 1.5.0 and somehow broke in 1.6.0) - ensure to run
npm installagain before committingpackage-lock.jsonafter removing any@forge/clidependency as per 1), otherwise keytar remains configured based on your local interactive environment - instead, install
@forge/clivia a separate step in your build environment to ensure it is configured w/o the interactive features (of course, you can optimize build times via a custom build image with the@forge/clipreinstalled) - the mentioned warnings can be ignored, or better yet avoided by ignoring the optional keytar dependency (thanks @remie):- npm 6.x:
npm install @forge/cli@2.0.1 --no-optional - npm 7.x:
npm install @forge/cli@2.0.1 --omit optional
- npm 6.x:
- ensure to add the
--non-interactiveflag to applicable commands likeforge loginandforge install