MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    `npm ci` instead of `npm install`

    Scheduled Pinned Locked Moved Solved Feature Requests
    9 Posts 4 Posters 1.4k Views 4 Watching
    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.
    • KristjanESPERANTOK Offline
      KristjanESPERANTO Module Developer
      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.

      bugsounetB karsten13K 2 Replies Last reply Reply Quote 0
      • bugsounetB Offline
        bugsounet Banned @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)

        KristjanESPERANTOK 1 Reply Last reply Reply Quote 0
        • KristjanESPERANTOK Offline
          KristjanESPERANTO Module Developer @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 Away
            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

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • karsten13K Offline
              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 Away
                sdetweil @karsten13
                last edited by sdetweil

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

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                karsten13K 1 Reply Last reply Reply Quote 0
                • karsten13K Offline
                  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 Away
                    sdetweil @karsten13
                    last edited by

                    @karsten13 right

                    but that is not ci

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • KristjanESPERANTOK Offline
                      KristjanESPERANTO Module Developer
                      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 Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy