[英]mean.io installation on windows
I followed the steps as specified at http://learn.mean.io/ . 我按照http://learn.mean.io/中指定的步骤进行操作。 I ran cmd as an adiminstrator.
我作为一个adiminstrator运行cmd。 But i'm getting below error on running but getting below error:
但是我在运行时遇到错误但是低于错误:
On windows platform - Please check permissions independently
All permissions should be run with the local users permissions
Cloning branch: master into destination folder: myApp2
git clone --depth 1 -bmaster https://github.com/linnovate/mean.git "myApp2"
FIND: Parameter format not correct
There are 2 files in your ~/.npm owned by root
Please change the permissions by running - chown -R `whoami` ~/.npm
C:\Users\CE\AppData\Roaming\npm\node_modules\mean-cli\lib\utils.js:67
throw('ROOT PERMISSIONS IN NPM');
^
ROOT PERMISSIONS IN NPM
If you open %APPDATA%\\npm\\node_modules\\mean-cli\\lib\\
you will see at the line 59
something like this: 如果打开
%APPDATA%\\npm\\node_modules\\mean-cli\\lib\\
您将在第59
行看到如下内容:
exports.checkNpmPermission = function (callback){
var homeDir = process.env[isWin ? 'USERPROFILE' : 'HOME'];
var findCmd = 'find ' + homeDir +'/.npm ' + '-user root';
shell.exec(findCmd, function( status, output){
var hasRootFiles = output.split(/\r\n|\r|\n/).length;
if (hasRootFiles > 1){
console.log (chalk.red('There are ' + hasRootFiles + ' files in your ~/.npm owned by root'));
console.log(chalk.green('Please change the permissions by running -'), 'chown -R `whoami` ~/.npm ');
throw('ROOT PERMISSIONS IN NPM');
}
});
callback();
};
The command: var findCmd = 'find ' + homeDir +'/.npm ' + '-user root';
命令:
var findCmd = 'find ' + homeDir +'/.npm ' + '-user root';
will not work on windows. 不会在Windows上工作。 Try to remove whole
shell.exec(...)
segment for workaround on your windows machine and then try to init
your mean app again. 尝试删除整个
shell.exec(...)
段以解决Windows机器上的变通方法,然后尝试再次init
您的平均应用程序。
Hope this will be fixed soon. 希望这很快就能解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.