![Vagrant文件](https://linux22.com/image/1631323/Vagrant%E6%96%87%E2%80%8B%E2%80%8B%E4%BB%B6.png)
我正在尝试安装节点守护程序从npm在我的 vagrant Ubuntu 18.04 LTS 盒子里使用此命令npm install --save-dev nodemon但我收到与无法找到文件相关的错误,我怀疑这是关于符号链接关于我的共享文件夹,这就是我尝试使用标志的原因--no-bin 链接但我仍然收到错误。
Vagrant文件
Vagrant.configure("2") do |config|
config.vm.box = "base"
config.vm.define "bionic_node_deno_v1" do |bionic_node_deno_v1|
bionic_node_deno_v1.vm.hostname = "192.168.22.33"
bionic_node_deno_v1.vm.box = "bento/ubuntu-18.04"
bionic_node_deno_v1.vm.network :private_network, ip: "192.168.22.33"
bionic_node_deno_v1.vm.provider "virtualbox" do |bionicv|
bionicv.memory = 4096
bionicv.cpus = 4
end
bionic_node_deno_v1.vm.synced_folder "~/Documents/vagrant-sync-folder/node-deno-version-1-sf","/home/vagrant/Code"
end
config.vm.network "forwarded_port", guest: 8085, host: 8787, host_ip: "127.0.0.1"
end
错误
出现错误的路径:/home/vagrant/Code
没有错误的路径:/home/vagrant/
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/vagrant/Code/node_modules/chalk/node_modules/has-flag/package.json.2851319490
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/vagrant/Code/node_modules/chalk/node_modules/has-flag/package.json.2851319490'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2020-08-23T07_33_33_057Z-debug.log