Nodejs + npm, installing modules on ntfs partition

前端 未结 7 1028
走了就别回头了
走了就别回头了 2021-01-30 06:52

I have a problem when installing npm modules. NodeJS is installed on Ubuntu 11.10 running on Virtual Box on Windows host. My project files are on NTFS partition (I have to share

相关标签:
7条回答
  • 2021-01-30 07:56

    For anyone still having this problem after trying npm install --no-bin-links.

    I wasn't able to get any of the above solutions to work when I came across a similar issue running npm install on a Laravel Homestead Vagrant box on a Windows 7 host using VirtualBox. The guest box has a mapped directory to the Windows file system.

    The problem was causing various error messages and failed package installations. The one that is most relevant to the question was npm ERR! UNKNOWN, symlink '<some filename>'.

    To fix this, I was able to successfully run npm install on the Git bash command line on Windows rather than bash on the guest Linux.

    To do this, you will need to install Git for Windows and NodeJS (both on your Windows box).

    e.g.

    1. Install Chocolatey https://chocolatey.org/
    2. choco install nodejs.install
    3. choco install git.install
    4. Run C:\Program Files (x86)\Git\Git Bash.vbs
    5. In the Git Bash command line, change directory to the location of your package.json file e.g. cd /c/projects/projectname
    6. Run npm install

    Everything appears to install successfully.

    0 讨论(0)
提交回复
热议问题