Git Product home page Git Product logo

Comments (6)

finleysg avatar finleysg commented on May 27, 2024

Ok, now that I've run through this on Linux, it looks like it's only a Windows problem.

I also understand the --compress switch now. Only compresses when you explicitly ask it to. Not 100% sure it works correctly on Windows, though, since the tarballs were compressed by default in the first project I used. I'll try to reproduce that behavior when I get back into work.

from shrinkpack.

finleysg avatar finleysg commented on May 27, 2024

Stacktrace reading comprehension fail - this is probably an upstream npm issue. I'm on npm 3.10.9, Windows 6.1.7601. The --compress flag fails regardless of whether or not I've configured a local project cache.

I'll be recommending to our teams to NOT compress the tarballs, so this will not be a blocking problem for us. Thank you for a terrific tool.

from shrinkpack.

JamieMason avatar JamieMason commented on May 27, 2024

Sorry for the delay @finleysg.

Do I understand correctly that, under any circumstances, running shrinkpack with the --compress flag does not work on Windows? If so, please re-open and we can get that addressed.

In a team scenario, how would we ensure everyone is using the same setting? Seems to me that this would be better as a discrete piece of configuration in a file under source control.

Something I do on my own projects is use npm scripts to share these project-related tasks, our shrinkpack task for example looks like below. We have no windows users so we're able to use rm, but packages like rimraf can do that part cross-platform.

  "devDependencies": {
    "shrinkpack": "0.17.1"
  },
  "scripts": {
    "build": "...",
    "lint": "...",
    "shrinkpack": "rm -rf ./npm-* ./node_modules && npm i && npm shrinkwrap --dev && shrinkpack",
    "start": "...",
    "test": "..."
  }

You could then run npm run shrinkpack instead of shrinkpack.

Controlling the version of npm your team is using can be managed using your package.json's engine field and using the strict-engines config in your .npmrc.

from shrinkpack.

finleysg avatar finleysg commented on May 27, 2024

Thank you for the team workflow suggestions.

Yes, on my Win7 machine, the --compress switch always fails for all dependencies. Same error/stack as I posted above. Doesn't matter whether we are using the default npm cache or a local project cache.

from shrinkpack.

JamieMason avatar JamieMason commented on May 27, 2024

This is still known about and will be picked up in the new codebase after #83 is released.

from shrinkpack.

JamieMason avatar JamieMason commented on May 27, 2024

[email protected] has been released which adds support for npm 7 and up. It also removes the --compress option and uses uncompressed tarballs by default.

from shrinkpack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.