Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/35.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
Node.js 删除节点模块文件夹后运行npm安装_Node.js_Angular_Npm - Fatal编程技术网

Node.js 删除节点模块文件夹后运行npm安装

Node.js 删除节点模块文件夹后运行npm安装,node.js,angular,npm,Node.js,Angular,Npm,我试图简单地从vs代码终端运行npm start,但出现了几个错误。第一个错误是找不到angular devkit/build angular,然后我运行:npm安装--保存dev@angular devkit/build angular,然后运行npm安装,出现以下错误: npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While reso

我试图简单地从vs代码终端运行npm start,但出现了几个错误。第一个错误是找不到angular devkit/build angular,然后我运行:npm安装--保存dev@angular devkit/build angular,然后运行npm安装,出现以下错误:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree        
npm ERR! 
npm ERR! While resolving: gvar-fe@0.0.0
npm ERR! Found: @angular/compiler@7.1.4
npm ERR!   @angular/compiler@"~7.1.4" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/compiler@"10.2.5" from @angular/compiler-cli@10.2.5
npm ERR! node_modules/@angular/compiler-cli
npm ERR!   dev @angular/compiler-cli@"^10.2.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
然后,我删除节点模块文件夹和包锁并运行:npm rm-rf node_modules,然后再次运行install并获得:

PS C:\Users\aa\Documents\Development\GVAR-WepAppRouting> npm install --legacy-peer-deps
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing 
is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path C:\Users\aa\Documents\Development\WepAppRouting\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\aa\Documents\Development\WepAppRouting\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli   'C:\\Users\\aa\\Documents\\Development\\WepAppRouting\\node_modules\\node-gyp\\bin\\node-gyp.js',
npm ERR! gyp verb cli   'rebuild',
npm ERR! gyp verb cli   '--verbose',
npm ERR! gyp verb cli   '--libsass_ext=',
npm ERR! gyp verb cli   '--libsass_cflags=',
npm ERR! gyp verb cli   '--libsass_ldflags=',
npm ERR! gyp verb cli   '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@15.13.0 | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (C:\Users\aa\Documents\Development\WepAppRouting\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed     at F (C:\Users\aa\Documents\Development\WepAppRouting\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed     at E (C:\Users\aa\Documents\Development\WepAppRouting\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed     at C:\Users\aa\Documents\Development\WepAppRouting\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed     at C:\Users\aa\Documents\Development\WepAppRouting\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed     at C:\Users\aa\Documents\Development\WepAppRouting\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:193:21)
npm ERR! gyp verb `which` failed  python2 Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (C:\Users\aa\Documents\Development\WepAppRouting\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed     at F (C:\Users\aa\Documents\Development\WepAppRouting\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed     at E (C:\Users\aa\Documents\Development\WepAppRouting\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed     at C:\Users\aa\Documents\Development\WepAppRouting\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed     at C:\Users\aa\Documents\Development\WepAppRouting\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed     at C:\Users\aa\Documents\Development\WepAppRouting\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:193:21) {
npm ERR! gyp verb `which` failed   code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` succeeded python C:\ProgramData\Anaconda3\python.EXE
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: Command failed: C:\ProgramData\Anaconda3\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack   File "<string>", line 1
npm ERR! gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack                       ^
npm ERR! gyp ERR! stack SyntaxError: invalid syntax
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:326:12)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:369:20)
npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1067:16)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! gyp ERR! System Windows_NT 10.0.18363
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\aa\\Documents\\Development\\WepAppRouting\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\Users\aa\Documents\Development\WepAppRouting\node_modules\node-sass
npm ERR! gyp ERR! node -v v15.13.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\aa\AppData\Local\npm-cache\_logs\2021-05-01T12_45_50_189Z-debug.log
PS C:\Users\aa\Documents\Development\GVAR-WepAppRouting>npm-install——遗留对等部门
npm警告不推荐的har-validator@5.1.5:不再支持此库
npm警告已弃用request@2.88.2:请求已被否决,请参阅https://github.com/request/request/issues/3142

npm警告弃用的内核-js@2.6.12:核心-js@The错误输出看起来您没有安装python。