简体   繁体   English

Yeoman角度生成器和npm安装

[英]Yeoman angular generator and npm install

I have created a VM for a mean stack. 我已经为平均堆栈创建了一个VM。 The install of which went with no issues. 安装没有任何问题。 node.js and others have been installed. 已经安装了node.js和其他文件。

I am using angular-fullstack to generate a boiler plate. 我正在使用angular-fullstack生成样板。 I am baffled by what happens when npm install is run. 我对运行npm install时发生的事情感到困惑。 I see that the system downloading all the dependencies but it's not stored in node_modules folder. 我看到系统正在下载所有依赖项,但它没有存储在node_modules文件夹中。 I believe it's being stored in the global folder. 我相信它存储在全局文件夹中。 When I try to run the stack from the local folder it says missing dependencies of almost everything. 当我尝试从本地文件夹运行堆栈时,它说缺少几乎所有内容的依赖关系。

I tried sudo, fixing permissions of global folder adding global folder to NODE_PATH but to no avail. 我尝试了sudo,修复了将全局文件夹添加到NODE_PATH的全局文件夹的权限,但无济于事。 I m still trying to figure why npm install is not installing in the local folder. 我仍在尝试弄清楚为什么npm install没有安装在本地文件夹中。

Thanks 谢谢

=============== ===============

This is the error i am getting when i run npm isntall 这是我运行npm isntall时遇到的错误

ERR! 呃! Error: EPERM: operation not permitted, rename '/vagrant/meandev/nal_angular_dashboard/node_modules/babel-plugin-transform-es2015-typeof-symbol' -> '/vagrant/meandev/nal_angular_dashboard/node_modules/.babel-plugin-transform-es2015-typeof-symbol.DELETE' 错误:EPERM:不允许执行此操作,请重命名'/ vagrant / meandev / nal_angular_dashboard / node_modules / babel-plugin-transform-es2015-typeof-symbol'->'/vagrant/meandev/nal_angular_dashboard/node_modules/.babel-plugin-transform- es2015-typeof-symbol.DELETE'

Uma, I've installed successfully on my machine angular-fullstack generator and beside some ruby and sass problems I managed to successfully start the app. 乌玛(Uma),我已经成功安装在机器的角度全堆栈发生器上,并且在成功解决该问题的同时,还遇到了一些红宝石和无聊的问题。

The node_modules were installed by the generator in the main project folder ... the one shared by server(nodejs) and client app(angularjs). 生成器将node_modules安装在主项目文件夹中……由服务器(nodejs)和客户端应用程序(angularjs)共享。

I was able to resolve this issue. 我能够解决此问题。

My dev environment is as follows 我的开发环境如下

Windows 7 host and Ubuntu running in Virtual box. Windows 7主机和Ubuntu在“虚拟”框中运行。 Ubuntu was provisioned and managed by Vagrant. Ubuntu由Vagrant设置和管理。

I found that when the Node.js project is in the shared folder (between windows and Ubuntu) npm install and grunt were throwing a bunch of errors related to permissions. 我发现,当Node.js项目位于共享文件夹中(Windows和Ubuntu之间)时,npm install和grunt会抛出一堆与权限相关的错误。 This was specific to my work computer which had defender, bitlocker and other stuff turned on. 这特定于我的工作计算机,其中已打开防御程序,bitlocker和其他功能。 The moment i moved my folder to pure UBuntu folder everything worked. 当我将文件夹移到纯UBuntu文件夹时,一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM