Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is npm ci supported? #406

Closed
evbo opened this issue Jun 28, 2021 · 3 comments
Closed

is npm ci supported? #406

evbo opened this issue Jun 28, 2021 · 3 comments

Comments

@evbo
Copy link

evbo commented Jun 28, 2021

I am noticing my package-lock.json file hasn't been getting honored by npm (not related to scalajs-bundler I don't think), which causes serious bugs due to slide versioning causing minor releases to be downloaded instead of static versions you've developed against.

What seems to definitely be the most certain way to enforce building using package-lock.json is running npm ci instead of npm install.

Is there a way to trigger this behavior through scalajs-bundler? I am currently cding into the target directory and running npm ci as a separate step:

(cd client/target/scala-2.13/scalajs-bundler/main/ && npm ci)

Is there a way to automate this as part of the sbt build?

@ghost
Copy link

ghost commented Aug 8, 2021

background on issue here: https://stackoverflow.com/questions/45022048/why-does-npm-install-rewrite-package-lock-json?rq=1

This would be a relatively small refactor, allowing the npm "install" command to be subbed for "ci", and would add great CI capability for those building in a Jenkins environment that want guarantees everything is freshly installed from a package-lock file.

Any interest in supporting npm ci in scalajs bundler from devs?

@ptrdom
Copy link
Contributor

ptrdom commented May 9, 2022

This will be implemented with #420 by allowing you to specify install command through settings.

@evbo
Copy link
Author

evbo commented May 9, 2022

awesome!

@evbo evbo closed this as completed May 9, 2022
Atry added a commit to Atry/ReactToBindingHtml.scala that referenced this issue Feb 1, 2023
Currently scalajs-bundler will always update the lock file, making working directory dirty on CI. See scalacenter/scalajs-bundler#420 and scalacenter/scalajs-bundler#406
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants