Node npm windows file paths are too long to install packages

后端 未结 9 1462
野性不改
野性不改 2020-11-29 17:58

Situation

I want to use gulp and related front-end tool chains in Windows-hosted development environments. I\'m hitting a wall trying to use gulp pl

相关标签:
9条回答
  • 2020-11-29 18:47

    If you are OK with installing it globally this could be a work-around:

    You can adjust the path where npm is installing the global modules to something very short (usually it is: c:\users\\{username}\AppData\Roaming\npm\npm_modules) which already takes a lot of characters.

    To adjust it see here: Change default global installation directory for node.js modules in Windows?

    If you adjust it to, e.g., c:\n\ in some cases it might solve the issue.

    0 讨论(0)
  • 2020-11-29 18:48

    npm install --no-bin-link. You will have a entire flattened node_modules

    0 讨论(0)
  • 2020-11-29 18:51

    In windows:

    1. Using your windows explorer, Navigate to your vagrant shared folder (I am using scotchbox by the way) e.g C:\scotchbox/public/gulpProject
    2. In the address bar of the folder, type cmd and press Enter
    3. Do your gulp installation npm install
    0 讨论(0)
提交回复
热议问题