致命错误LNK1107:文件无效或损坏:无法读取0x21E00D

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了致命错误LNK1107:文件无效或损坏:无法读取0x21E00D相关的知识,希望对你有一定的参考价值。

我是节点新手,我有节点版本8.6。每当我尝试构建这个特定的应用程序,我从git克隆了一个教程导师构建并且他正在工作时,我得到了这个错误。我已经尝试了所有我能想到的但是每当我运行npm install命令时这个错误仍然存​​在

C:UsersOgbonna Vitalis Pc.node-gyp8.6.0x64
ode.lib : fatal error LNK1107: invalid or corrupt file: cannot read at
 0x21E00D [C:xampphtdocs
odejsofflinewebwittr
ode_modules
ode-sassuildinding.vcxproj]
Done Building Project "C:xampphtdocs
odejsofflinewebwittr
ode_modules
ode-sassuildinding.vcxproj" (default t
argets) -- FAILED.

Done Building Project "C:xampphtdocs
odejsofflinewebwittr
ode_modules
ode-sassuildinding.vcxproj.metaproj" (
default targets) -- FAILED.

Done Building Project "C:xampphtdocs
odejsofflinewebwittr
ode_modules
ode-sassuildinding.sln" (default targe
ts) -- FAILED.


Build FAILED.

"C:xampphtdocs
odejsofflinewebwittr
ode_modules
ode-sassuildinding.sln" (default target) (1) ->
"C:xampphtdocs
odejsofflinewebwittr
ode_modules
ode-sassuildinding.vcxproj.metaproj" (default target) (2) ->
"C:xampphtdocs
odejsofflinewebwittr
ode_modules
ode-sassuildsrclibsass.vcxproj" (default target) (3) ->
(ClCompile target) ->
  cl : Command line warning D9025: overriding '/GR-' with '/GR' [C:xampphtdocs
odejsofflinewebwittr
ode_modules

ode-sassuildsrclibsass.vcxproj]
  cl : Command line warning D9025: overriding '/GR-' with '/GR' [C:xampphtdocs
odejsofflinewebwittr
ode_modules

ode-sassuildsrclibsass.vcxproj]
  cl : Command line warning D9025: overriding '/GR-' with '/GR' [C:xampphtdocs
odejsofflinewebwittr
ode_modules

ode-sassuildsrclibsass.vcxproj]
  cl : Command line warning D9025: overriding '/GR-' with '/GR' [C:xampphtdocs
odejsofflinewebwittr
ode_modules

ode-sassuildsrclibsass.vcxproj]
  cl : Command line warning D9025: overriding '/GR-' with '/GR' [C:xampphtdocs
odejsofflinewebwittr
ode_modules

ode-sassuildsrclibsass.vcxproj]
  ....srclibsasssrcjson.cpp(26): warning C4005: '_CRT_NONSTDC_NO_DEPRECATE': macro redefinition [C:xampphtdocs

odejsofflinewebwittr
ode_modules
ode-sassuildsrclibsass.vcxproj]
  ....srclibsasssrcsass2scss.cpp(9): warning C4005: '_CRT_NONSTDC_NO_DEPRECATE': macro redefinition [C:xampphtdo
cs
odejsofflinewebwittr
ode_modules
ode-sassuildsrclibsass.vcxproj]
  cl : Command line warning D9025: overriding '/GR-' with '/GR' [C:xampphtdocs
odejsofflinewebwittr
ode_modules

ode-sassuildsrclibsass.vcxproj]


"C:xampphtdocs
odejsofflinewebwittr
ode_modules
ode-sassuildinding.sln" (default target) (1) ->
"C:xampphtdocs
odejsofflinewebwittr
ode_modules
ode-sassuildinding.vcxproj.metaproj" (default target) (2) ->
"C:xampphtdocs
odejsofflinewebwittr
ode_modules
ode-sassuildinding.vcxproj" (default target) (4) ->
  ..srcinding.cpp(140): warning C4244: 'argument': conversion from 'size_t' to 'double', possible loss of data [C:x
ampphtdocs
odejsofflinewebwittr
ode_modules
ode-sassuildinding.vcxproj]
  c:xampphtdocs
odejsofflinewebwittr
ode_modules
an
an_new.h(208): warning C4244: 'argument': conversion from '
size_t' to 'double', possible loss of data (compiling source file ..srcsass_typeslist.cpp) [C:xampphtdocs
odejso
fflinewebwittr
ode_modules
ode-sassuildinding.vcxproj]
  c:xampphtdocs
odejsofflinewebwittr
ode_modules
an
an_new.h(208): warning C4244: 'argument': conversion from '
size_t' to 'double', possible loss of data (compiling source file ..srcsass_typesmap.cpp) [C:xampphtdocs
odejsof
flinewebwittr
ode_modules
ode-sassuildinding.vcxproj]


"C:xampphtdocs
odejsofflinewebwittr
ode_modules
ode-sassuildinding.sln" (default target) (1) ->
"C:xampphtdocs
odejsofflinewebwittr
ode_modules
ode-sassuildinding.vcxproj.metaproj" (default target) (2) ->
"C:xampphtdocs
odejsofflinewebwittr
ode_modules
ode-sassuildinding.vcxproj" (default target) (4) ->
(Link target) ->
  C:UsersOgbonna Vitalis Pc.node-gyp8.6.0x64
ode.lib : fatal error LNK1107: invalid or corrupt file: cannot read
at 0x21E00D [C:xampphtdocs
odejsofflinewebwittr
ode_modules
ode-sassuildinding.vcxproj]

    11 Warning(s)
    1 Error(s)

Time Elapsed 00:04:58.47
gyp ERR! build error
gyp ERR! stack Error: `C:Program Files (x86)MSBuild14.0inmsbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:xampphtdocs
odejsofflinewebwittr
ode_modules
ode-gyplibuild.js:258:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\xampp\htdocs\nodejs\offlineweb\wittr\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:xampphtdocs
odejsofflinewebwittr
ode_modules
ode-sass
gyp ERR! node -v v8.6.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bufferutil@1.2.1 (node_modulesufferutil):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bufferutil@1.2.1 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: utf-8-validate@1.2.2 (node_modulesutf-8-validate):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: utf-8-validate@1.2.2 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@3.13.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.13.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:UsersOgbonna Vitalis PcAppDataRoaming
pm-cache\_logs2017-10-29T22_55_33_341Z-debug.log

请您的建议将非常感谢。提前致谢。

答案

经过广泛的研究,我在github中创建了一个问题,在那里我克隆了测试应用程序。建议使用此解决方案,它对我有用。 https://github.com/jakearchibald/wittr/issues/27

另一答案

我也找到了this helpful comment。安装Python 2.7和Visual C ++ Build Tools后,我删除了node_modules文件夹,从Administrator打开CMD并运行npm install --msvs_version=2015。它安装成功!

This link帮我安装了Python和VS C ++构建工具。

以上是关于致命错误LNK1107:文件无效或损坏:无法读取0x21E00D的主要内容,如果未能解决你的问题,请参考以下文章

链接到 opencv 的奇怪链接器错误...“LNK1107:无效或损坏的文件:无法在 0x2E8 读取”

PostgreSQL C++ Api 出现错误 LNK1107:文件无效或损坏:无法在 0x2E8 读取

LNK1107文件无效或损坏: 无法在 0x308 处读取 解决方案

解决VS2010链接错误:LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏

错误 1 error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏 C:UsersAdminist

vs2010 出错:error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏(转)