Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 如何解决此安装问题_Angular_Installation_Angular Cli - Fatal编程技术网

Angular 如何解决此安装问题

Angular 如何解决此安装问题,angular,installation,angular-cli,Angular,Installation,Angular Cli,我正在windows 7系统上安装新项目, 我在安装中遇到问题 有什么办法解决这个问题吗 我已经创建了新的角度项目 这是错误的 我还尝试在旧项目中安装npm,但它不再工作 ,我还尝试再次安装typescript,我还尝试删除package-lock.json并再次安装npm,然后我尝试了ng v 当ng v拿到这个的时候 Angular CLI: 8.0.3 Node: 10.16.0 OS: win32 ia32 Angular: <error> ... animations, c

我正在windows 7系统上安装新项目, 我在安装中遇到问题 有什么办法解决这个问题吗

我已经创建了新的角度项目 这是错误的 我还尝试在旧项目中安装npm,但它不再工作 ,我还尝试再次安装typescript,我还尝试删除package-lock.json并再次安装npm,然后我尝试了ng v

当ng v拿到这个的时候

Angular CLI: 8.0.3
Node: 10.16.0
OS: win32 ia32
Angular: <error>
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.800.3 (cli-only)
@angular-devkit/build-angular   <error>
@angular-devkit/core            8.0.3 (cli-only)
@angular-devkit/schematics      8.0.3 (cli-only)
@schematics/angular             8.0.3 (cli-only)
@schematics/update              0.800.3 (cli-only)
rxjs                            6.4.0 (cli-only)
typescript                      <error>

有没有办法解决这个问题?

这似乎是您的节点/npm的问题,而不是Angular CLI的问题

步骤1:以管理员身份卸载angular/cli和nodejs

步骤2:从
%appdata%
(npm,npm缓存)中删除文件夹,或使用以下命令
npm缓存清理

步骤3:从程序和文件中删除“nodejs”文件夹

步骤4:重新启动

步骤5重新安装最新版本节点


Setp 6:Install angular/cli

我在尝试创建新的angular项目时遇到了类似的问题。 我不知道你是否已经解决了你的问题但是对于那些仍然有同样问题的人, 这个答案对我有用
希望它也能为您工作。

按您所说的做了所有事情。…安装了node n npm,angular无法在VS Code terminal上安装尝试在cmd中安装,但在创建新项目时出现相同的错误。。?任何其他suggestion@GajananShinde尝试使用node cmd安装cli,并使用相同的命令创建新项目
npm ERR! path D:\AngularProject\myNew\node_modules\.staging\@yarnpkg\lockfile-31897f94\index.js
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'D:\AngularProject\myNew\node_modules\.staging\@yarnpkg\lockfile-31897f94\index.js'
npm ERR!  { [Error: EPERM: operation not permitted, unlink 'D:\AngularProject\myNew\node_modules\.staging\@yarnpkg\lockfile-31897f94\index.js']
npm ERR!   cause:
npm ERR!    { Error: EPERM: operation not permitted, unlink 'D:\AngularProject\myNew\node_modules\.staging\@yarnpkg\lockfile-31897f94\index.js'
npm ERR!      errno: -4048,
npm ERR!      code: 'EPERM',
npm ERR!      syscall: 'unlink',
npm ERR!      path:
npm ERR!       'D:\\AngularProject\\myNew\\node_modules\\.staging\\@yarnpkg\\lockfile-31897f94\\index.js' },
npm ERR!   stack:
npm ERR!    'Error: EPERM: operation not permitted, unlink \'D:\\AngularProject\\myNew\\node_modules\\.staging\\@yarnpkg\\lockfile-31897f94\\index.js\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'unlink',
npm ERR!   path:
npm ERR!    'D:\\AngularProject\\myNew\\node_modules\\.staging\\@yarnpkg\\lockfile-31897f94\\index.js',
npm ERR!   parent: 'myNew' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).