5 ms·
We use node on Windows for our asset minifiers, hopefully the new version of NPM will make this a little more pleasant! Your dependencies will now be installed
by amarraja 11y ago
We use node on Windows for our asset minifiers, hopefully the new version of NPM will make this a little more pleasant!
Your dependencies will now be installed maximally flat. Insofar as is possible, all of your dependencies, and their dependencies, and THEIR dependencies will be installed in your project's node_modules folder with no nesting. You'll only see modules nested underneath one another when two (or more) modules have conflicting dependencies.
- azernik 11y agoI can testify that this is a Big Deal. I manually upgraded to NPM 3 for my own minification/bundling system because the old behavior was breaking dependencies (one package passing React objects to another, and each one depending on different versions of React). Part of the issue is that the old method of dependency resolution, especially for peerDependencies, was just awful.
- frik 11y agoMaybe Microsoft wakes up to fix the MAXPATH limit (260 chars). Recently the improved UI of the environment variable dialog, after 25 years.
- dsp1234 11y agoMany (most? all?) windows apis that take absolute paths can take extended length paths. Extended length paths (just add \\?\ to the front of your normal local path, or \\?\UNC to the front of your UNC paths) allow up to 32K paths. I'm not really sure why node doesn't use them internally to solve the issue.
- frik 11y agoOnly a few WinAPI functions can take UNC path, Explorer and cmd.exe don't support them either. The same problem has with the dotNet framework which is implemented on top of WinAPI. Nodejs is a console application and can call system applications via command line/cmd.exe. WinNT kernel and NTFS/ReFS have no such path limitations, that limitation comes from Win16 API and to make the job easier the Win32API and its subsystem (32-bit and 64-bit Windows since Win3.11 with Win32s addon and Win95) comes with such legacy restrictions.
- M2Ys4U 11y agoYou can use npm@3 without upgrading node - we use npm@3 and node 0.10 at work, although we mainly use it for out build tools and haven't migrated out node microservices - yet.