我正在尝试设置MEAN环境。我一直收到这个错误:
错误:ENOENT,没有这样的文件或目录 '/home/user/app1/bower_components/jquery/dist/jquery.min.map'
我尝试过CentOS7和RHEL6,在CentOS上我尝试从源代码安装nodejs,也从epel安装。在RHEL6上,我使用此方法来设置nodejs:
curl -sL https://rpm.nodesource.com/setup | bash -
yum install -y nodejs
npm install -g mean-cli
mean init app1
cd app1 && node install
grunt
<error>
当我尝试bower install
时,我在bower install上获得了Failed to execute "git ls-remote --tags --heads git://github.com/angular/bower-angular-mocks.git", exit code of #128
。要修复此问题,请运行此命令git config --global url."https://".insteadOf git://
我不确定它是否持久。
这解决了RHEL6上的问题,但它没有在CentOS7上修复它。我回到CentOS7并再次尝试,它似乎有效......我只是继续前进,现在不再质疑。
答案 0 :(得分:11)
您需要运行bower install
来下载这些依赖项。您将在项目根目录中使用bower.json和package.json(因为您正在运行npm install
)来指定项目依赖项。