MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.20.0 is available! For more information about this release, check out this topic.

    SOLVED `npm ci` instead of `npm install`

    Feature Requests
    4
    9
    179
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • KristjanESPERANTO
      KristjanESPERANTO last edited by

      What do you think about switching from npm install to npm ci?

      I’m not an npm/node expert, but my understanding is that there could be some advantages.

      If we use npm ci, we’ll get reliable builds. Users who install a release get exactly the versions that worked on the release.

      B karsten13 2 Replies Last reply Reply Quote 0
      • B
        bugsounet @KristjanESPERANTO last edited by bugsounet

        @KristjanESPERANTO :

        Hi, many developer don’t know what is package.json file
        in your case, this command need package-lock.json (auto generated by npm install or by developer)
        Many, many modules are not maintened, i don’t think it’s very usable (maybe module need some new system tools before this command)


        I am not a reference in this forum
        I am not a magician
        I'm just a developer

        Please DON'T ADS ANY of My Modules There !

        Follow new support of 4th party modules on https://forum.bugsounet.fr

        KristjanESPERANTO 1 Reply Last reply Reply Quote 0
        • KristjanESPERANTO
          KristjanESPERANTO @bugsounet last edited by

          many developer don’t know what is package.json file

          Isn’t that one of the first things you learn when you start using npm? 🙂

          this command need package-lock.json

          Yes, of course. And the core system has the package-lock.json. I was not talking about modules. Sorry if that was not clear.

          S 1 Reply Last reply Reply Quote 0
          • S
            sdetweil @KristjanESPERANTO last edited by

            @kristjanesperanto said in `npm ci` instead of `npm install`:

            Isn’t that one of the first things you learn when you start using npm?

            no. I hadn’t heard about packages on til at least a year after I had written my first module.

            Sam

            Create a working config
            How to add modules

            1 Reply Last reply Reply Quote 0
            • karsten13
              karsten13 @KristjanESPERANTO last edited by

              @kristjanesperanto

              I used npm ci for a while. Because the package-lock.json format changed meanwhile I had problems with npm ci --no-optional with node 14, so I switched back to npm install.

              But main point is you don’t get needed updates, e.g. we had in October an electron update because of invalid certs, in this case you had to use npm install.

              As this is no direct part of the code we could update the documentation and explain both variants but I would prefer npm install as the default variant. Everyone who knows the difference can use what he wants.

              S 1 Reply Last reply Reply Quote 0
              • S
                sdetweil @karsten13 last edited by sdetweil

                @karsten13 I use npm install in the installer and updater for all these reasons

                Sam

                Create a working config
                How to add modules

                karsten13 1 Reply Last reply Reply Quote 0
                • karsten13
                  karsten13 @sdetweil last edited by

                  @sdetweil

                  yes, and AFAIK you are using npm install --only=prod. This is may a thing to be mentioned in the docs because 99% of the users don’t need the dev dependencies …

                  S 1 Reply Last reply Reply Quote 1
                  • S
                    sdetweil @karsten13 last edited by

                    @karsten13 right

                    but that is not ci

                    Sam

                    Create a working config
                    How to add modules

                    1 Reply Last reply Reply Quote 0
                    • KristjanESPERANTO
                      KristjanESPERANTO last edited by

                      Okay, thanks for your opinions. I’ll use npm ci for a while with my instances to gain more experience.

                      I mark this thread as solved for now. Further opinions are of course welcome.

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy