簡體   English   中英

Sharp通過Windows 10 x64上的npm安裝,但是gatsby development找不到過程\\ sharp.node

[英]Sharp installs via npm on Windows 10 x64, but gatsby develop does not find procedure \sharp.node

我已經安裝了windows-build-tools和node-gyp。 安裝gatsby-plugin-sharp確實有效:

+ sharp@0.23.0
+ gatsby-plugin-sharp@2.2.22
+ gatsby-transformer-sharp@2.2.14
added 255 packages from 219 contributors, removed 4 packages, updated 6 packages and audited 31172 packages in 77.277s
found 0 vulnerabilities

我只有2條警告:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

但是,如果我開始進行gatsby開發,則會收到錯誤消息:

PS D:\Projekte\gatsby\projectname> gatsby develop
success open and validate gatsby-configs - 0.260 s

Something went wrong installing the "sharp" module

Die angegebene Prozedur wurde nicht gefunden.
\\?\D:\Projekte\gatsby\projectname\node_modules\gatsby-plugin-manifest\node_modules\sharp\build\Release\sharp.node

- Remove the "node_modules/sharp" directory, run "npm install" and look for errors
- Consult the installation documentation at https://sharp.pixelplumbing.com/en/stable/install/
- Search for this error at https://github.com/lovell/sharp/issues

我確實刪除了該文件夾,並進行了“ npm install”操作,但這不起作用。 文件Sharp.node在那里,但是“ \\\\?\\”是什么意思?

我重新安裝了gatsby-plugin-sharp和gatsby-plugin-manifest和gatsby-image並使用空緩存使npm安裝。 這工作了。 Sharp模塊的package.json中現在有args:

"_args": [
      [
        "sharp@0.23.0",
        "D:\\Projekte\\gatsby\\projectname"
      ]
    ],

通過在gatsby-plugin-sharp之后安裝鋒利的(不是必需的)縫隙,發現某些東西損壞了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM