npm安装gatsby在WSL中失败,例如

npm安装gatsby在WSL中失败,例如,npm,npm-install,gatsby,contentful,Npm,Npm Install,Gatsby,Contentful,我正在尝试使用WSL在我的windows机器上运行此git repo。。。。 git克隆 运行npm安装会给我以下错误,这些错误似乎是在尝试安装盖茨比插件时出现的。我尝试添加Windows构建工具和VisualStudio C++ 2015常用工具。不知道我错过了什么 C:\Users\justi\AppData\Local\Microsoft\WindowsApps\ubuntu.exe run "export PATH=/home/linuxbrew/.linuxbrew/bin:$PATH

我正在尝试使用WSL在我的windows机器上运行此git repo。。。。 git克隆

运行npm安装会给我以下错误,这些错误似乎是在尝试安装盖茨比插件时出现的。我尝试添加Windows构建工具和VisualStudio C++ 2015常用工具。不知道我错过了什么

C:\Users\justi\AppData\Local\Microsoft\WindowsApps\ubuntu.exe run "export PATH=/home/linuxbrew/.linuxbrew/bin:$PATH && /home/linuxbrew/.linuxbrew/bin/node /home/linuxbrew/.linuxbrew/lib/node_modules/npm/bin/npm-cli.js install --scripts-prepend-node-path=auto"

> sharp@0.20.5 install /mnt/c/Users/justi/IdeaProjects/starter-gatsby-blog/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.6.1/libvips-8.6.1-linux-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=12.1.0 runtime=node arch=x64 platform=linux)
make: Entering directory '/mnt/c/Users/justi/IdeaProjects/starter-gatsby-blog/node_modules/sharp/build'
  TOUCH Release/obj.target/libvips-cpp.stamp
  CXX(target) Release/obj.target/sharp/src/common.o
In file included from ../../nan/nan_converters.h:67:0,
                 from ../../nan/nan.h:202,
                 from ../src/common.cc:24:
../../nan/nan_converters_43_inl.h: In static member function 'static Nan::imp::ToFactoryBase<v8::Boolean>::return_t
.........
.........
.........Removing A bunch of variables not compiling
.........
.........
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:196:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
gyp ERR! System Linux 4.4.0-17763-Microsoft
gyp ERR! command "/home/linuxbrew/.linuxbrew/Cellar/node/12.1.0/bin/node" "/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /mnt/c/Users/justi/IdeaProjects/starter-gatsby-blog/node_modules/sharp
gyp ERR! node -v v12.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN friendly-errors-webpack-plugin@1.7.0 requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp@0.20.5 install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp@0.20.5 install 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!     /home/jsmith/.npm/_logs/2019-05-04T15_11_23_965Z-debug.log
C:\Users\justi\AppData\Local\Microsoft\WindowsApps\ubuntu.exe运行“export PATH=/home/linuxbrew/.linuxbrew/bin:$PATH&/home/linuxbrew/bin/node/home/linuxbrew/.linuxbrew/lib/node\u模块/npm/bin/npm-cli.js安装--脚本prepend node PATH=auto”
> sharp@0.20.5安装/mnt/c/Users/justi/IdeaProjects/starter gatsby blog/node_modules/sharp
>(节点安装/libvips&&node安装/dll复制和预构建安装)| |(节点gyp重建和节点安装/dll复制)
夏普信息下载https://github.com/lovell/sharp-libvips/releases/download/v8.6.1/libvips-8.6.1-linux-x64.tar.gz
预编译安装警告安装未找到预编译二进制文件(目标=12.1.0运行时=节点arch=x64平台=linux)
make:输入目录“/mnt/c/Users/justi/IdeaProjects/starter gatsby blog/node_modules/sharp/build”
触摸释放/obj.target/libvips-cpp.stamp
CXX(目标)发布/obj.target/sharp/src/common.o
在.././nan/nan_converters.h:67:0中包含的文件中,
from.././nan/nan.h:202,
从../src/common.cc:24:
../../nan/nan\u转换器\u 43\u inl.h:在静态成员函数“static nan::imp::ToFactoryBase::return\t”中
.........
.........
删除一组未编译的变量
.........
.........
哎呀!构建错误
哎呀!堆栈错误:`make`失败,退出代码:2
哎呀!在ChildProcess.onExit(/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/node gyp/lib/build.js:262:23)处堆栈
哎呀!ChildProcess.emit处的堆栈(events.js:196:13)
哎呀!在Process.ChildProcess.\u handle.onexit(internal/child\u Process.js:256:12)处堆栈
哎呀!系统Linux 4.4.0-17763-Microsoft
哎呀!命令“/home/linuxbrew/.linuxbrew/ceral/node/12.1.0/bin/node”“/home/linuxbrew/.linuxbrew/lib/node_modules/npm/node_modules/node gyp/bin/node gyp.js”“重建”
哎呀!cwd/mnt/c/Users/justi/IdeaProjects/starter gatsby blog/node_modules/sharp
哎呀!节点-v12.1.0
哎呀!节点gyp-v3.8.0
哎呀!不好
npm警告友好错误网页-plugin@1.7.0需要webpack@^2.0.0 | | ^3.0.0 | | ^4.0.0的对等机,但未安装。您必须自己安装对等依赖项。
npm警告可选跳过可选依赖项:fsevents@1.2.4(节点\单元模块/fsevents):
npm WARN notsup跳过可选依赖项:不支持的平台fsevents@1.2.4:通缉{“os”:“darwin”,“arch”:“any”}(当前:{“os”:“linux”,“arch”:“x64”})
npm错误!代码失效循环
npm错误!错误1
npm错误!sharp@0.20.5安装:`(节点安装/libvips&&node安装/dll复制和预构建安装)| |(节点gyp重建和节点安装/dll复制)`
npm错误!退出状态1
npm错误!
npm错误!失败sharp@0.20.5安装脚本。
npm错误!这可能不是npm的问题。上面可能还有其他日志输出。
npm错误!此运行的完整日志可在以下位置找到:
npm错误/home/jsmith/.npm/_logs/2019-05-04T15_11_23_965Z-debug.log
这里有完整的错误日志,因为它太大了。。。

我也有同样的问题。你找到解决办法了吗?我试图删除节点gyp文件夹,清理npm缓存,重新启动,重新安装,但什么也没发生。当我试图安装盖茨比内容样板时,我仍然有这个错误。