angular初始化项目时报错resource busy or locked

背景

使用angular初始化工程,angular new ng-app

问题现象

命令行报错resource busy or locked

处理过程

根据报错信息发现是和node gyp有关,查了下,了解到gyp是用来编译C++相关库的。根据node-gyp中的说明,下载visual studio(实际下载的是2019版本的),并安装,然后设置npm config set msvs_version 2019

然后再次运行angular new ng-app正常了。

? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? CSS
CREATE ng-app-test/angular.json (3069 bytes)
CREATE ng-app-test/package.json (1082 bytes)
CREATE ng-app-test/README.md (1055 bytes)
CREATE ng-app-test/tsconfig.json (783 bytes)
CREATE ng-app-test/.editorconfig (274 bytes)
CREATE ng-app-test/.gitignore (604 bytes)
CREATE ng-app-test/.browserslistrc (703 bytes)
CREATE ng-app-test/karma.conf.js (1428 bytes)
CREATE ng-app-test/tsconfig.app.json (287 bytes)
CREATE ng-app-test/tsconfig.spec.json (333 bytes)
CREATE ng-app-test/src/favicon.ico (948 bytes)
CREATE ng-app-test/src/index.html (295 bytes)
CREATE ng-app-test/src/main.ts (372 bytes)
CREATE ng-app-test/src/polyfills.ts (2820 bytes)
CREATE ng-app-test/src/styles.css (80 bytes)
CREATE ng-app-test/src/test.ts (743 bytes)
CREATE ng-app-test/src/assets/.gitkeep (0 bytes)
CREATE ng-app-test/src/environments/environment.prod.ts (51 bytes)
CREATE ng-app-test/src/environments/environment.ts (658 bytes)
CREATE ng-app-test/src/app/app-routing.module.ts (245 bytes)
CREATE ng-app-test/src/app/app.module.ts (393 bytes)
CREATE ng-app-test/src/app/app.component.html (24617 bytes)
CREATE ng-app-test/src/app/app.component.spec.ts (1088 bytes)
CREATE ng-app-test/src/app/app.component.ts (215 bytes)
CREATE ng-app-test/src/app/app.component.css (0 bytes)
√ Packages installed successfully.
    Successfully initialized git.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章