Longlongyu / hexo-theme-Cxo

A cool ,simple & beautiful theme for Hexo. :mushroom:
MIT License
137 stars 36 forks source link

安装sass renderer时报错,不知道该怎么解决 #47

Open kasisama opened 2 years ago

kasisama commented 2 years ago

在使用npm install hexo-renderer-jade hexo-renderer-sass --save命令时出错,查询无果,前来询问大佬们QAQ 提示如下图: QQ截图20220407190523 文本:

$ npm install hexo-renderer-jade hexo-renderer-sass --save npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap. npm ERR! code 1 npm ERR! path F:\开发文件\HexoBlog\second\node_modules\hexo-renderer-sass\node_modules\node-sass npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild npm ERR! 在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。 npm ERR! C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform.Targets(23,7): error MSB8007: 项目“libsass.vcxproj”的平台无效。平台为“x64”。您会看到此消息的可能原因是,您尝试在没有解决方案文件的情况下生成项目,并且为此项目指定了并不存在的非默认平台。 [F:\开发文件\HexoBlog\second\node_modules\hexo-renderer-sass\node_modules\node-sass\build\src\libsass.vcxproj] npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@3.8.0 npm ERR! gyp info using node@16.14.2 | win32 | x64 npm ERR! (node:19692) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only. npm ERR! (Use node --trace-deprecation ... to show where the warning was created) npm ERR! gyp info spawn E:\python2.7\python.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'F:\开发文件\HexoBlog\second\node_modules\hexo-renderer-sass\node_modules\node-gyp\gyp\gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'msvs', npm ERR! gyp info spawn args '-G', npm ERR! gyp info spawn args 'msvs_version=auto', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'F:\开发文件\HexoBlog\second\node_modules\hexo-renderer-sass\node_modules\node-sass\build\config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'F:\开发文件\HexoBlog\second\node_modules\hexo-renderer-sass\node_modules\node-gyp\addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\ASUS\.node-gyp\16.14.2\include\node\common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\ASUS\.node-gyp\16.14.2', npm ERR! gyp info spawn args '-Dnode_gyp_dir=F:\开发文件\HexoBlog\second\node_modules\hexo-renderer-sass\node_modules\node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=C:\Users\ASUS\.node-gyp\16.14.2\<(target_arch)\node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=F:\开发文件\HexoBlog\second\node_modules\hexo-renderer-sass\node_modules\node-sass', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'F:\开发文件\HexoBlog\second\node_modules\hexo-renderer-sass\node_modules\node-sass\build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'build/binding.sln', npm ERR! gyp info spawn args '/clp:Verbosity=minimal', npm ERR! gyp info spawn args '/nologo', npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64' npm ERR! gyp info spawn args ] npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess.onExit (F:\开发文件\HexoBlog\second\node_modules\hexo-renderer-sass\node_modules\node-gyp\lib\build.js:262:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:526:28) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) npm ERR! gyp ERR! System Windows_NT 10.0.22581 npm ERR! gyp ERR! command "E:\nodejs\node.exe" "F:\开发文件\HexoBlog\second\node_modules\hexo-renderer-sass\node_modules\node-gyp\bin\node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd F:\开发文件\HexoBlog\second\node_modules\hexo-renderer-sass\node_modules\node-sass npm ERR! gyp ERR! node -v v16.14.2 npm ERR! gyp ERR! node-gyp -v v3.8.0 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\ASUS\AppData\Local\npm-cache_logs\2022-04-07T10_58_58_226Z-debug-0.log