Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/23.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.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
Reactjs 如何在尝试启动microsoft/vscode react示例时修复此错误_Reactjs_Visual Studio Code - Fatal编程技术网

Reactjs 如何在尝试启动microsoft/vscode react示例时修复此错误

Reactjs 如何在尝试启动microsoft/vscode react示例时修复此错误,reactjs,visual-studio-code,Reactjs,Visual Studio Code,我是一个新的反应和经历这个GitHub的人 我从GitHub下载了zip,并用Visual Studio代码打开它 我在启动前端时出现了这个错误 当我尝试这样安装它时: npm安装节点sass 我得到了这样一个巨大的错误: L:\NetProject\vscode-react-sample-master>npm install node-sass > node-sass@3.13.1 install L:\NetProject\vscode-react-sample-master

我是一个新的反应和经历这个GitHub的人

我从GitHub下载了zip,并用Visual Studio代码打开它

我在启动前端时出现了这个错误

当我尝试这样安装它时:

npm安装节点sass

我得到了这样一个巨大的错误:

L:\NetProject\vscode-react-sample-master>npm install node-sass

> node-sass@3.13.1 install L:\NetProject\vscode-react-sample-master\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-64_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> node-sass@3.13.1 postinstall L:\NetProject\vscode-react-sample-master\node_modules\node-sass
> node scripts/build.js

Building: C:\Program Files\nodejs\node.exe L:\NetProject\vscode-react-sample-master\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=


gyp verb `which` failed   stack:
gyp verb `which` failed    'Error: not found: python2\n    at getNotFoundError (L:\\NetProject\\vscode-react-sample-master\\node_modules\\which\\which.js:13:12)\n    at F (L:\\NetProject\\vscode-react-sample-master\\node_modules\\which\\which.js:68:19)\n    at E (L:\\NetProject\\vscode-react-sample-master\\node_modules\\which\\which.js:80:29)\n    at L:\\NetProject\\vscode-react-sample-master\\node_modules\\which\\which.js:89:16\n    at L:\\NetProject\\vscode-react-sample-master\\node_modules\\isexe\\index.js:42:5\n    at L:\\NetProject\\vscode-react-sample-master\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:154:21)',

Projekt i lösningen genereras ett åt gången. Lägg till växeln /m om du vill generera flera projekt samtidigt.
Genereringen startade 2019-06-30 17:13:45.
Projektet L:\NetProject\vscode-react-sample-master\node_modules\node-sass\build\binding.sln på nod 1 (standardmål).
ValidateSolutionConfiguration:
  Genererar lösningskonfigurationen Release|x64.
MSBUILD : error MSB3428: Det gick inte att läsa in Visual C++-komponenten VCBuild.exe. Du åtgärdar detta genom att installera .NET Framework 2.0
 SDK, installera Microsoft Visual Studio 2005 eller genom att lägga till sökvägen till komponenten i systemsökvägen om den är installerad på en
annan plats.  [L:\NetProject\vscode-react-sample-master\node_modules\node-sass\build\binding.sln]
Projektgenereringen av L:\NetProject\vscode-react-sample-master\node_modules\node-sass\build\binding.sln (standardmål) misslyckades.


Genereringen misslyckades.

L:\NetProject\vscode-react-sample-master\node_modules\node-sass\build\binding.sln (standardmål) (1) ->
(_src_\libsass mål) ->
  MSBUILD : error MSB3428: Det gick inte att läsa in Visual C++-komponenten VCBuild.exe. Du åtgärdar detta genom att installera .NET Framework 2
.0 SDK, installera Microsoft Visual Studio 2005 eller genom att lägga till sökvägen till komponenten i systemsökvägen om den är installerad på e
n annan plats.  [L:\NetProject\vscode-react-sample-master\node_modules\node-sass\build\binding.sln]

    0 varningar
    1 fel

Förfluten tid: 00:00:00.75
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (L:\NetProject\vscode-react-sample-master\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "L:\\NetProject\\vscode-react-sample-master\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd L:\NetProject\vscode-react-sample-master\node_modules\node-sass
gyp ERR! node -v v10.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN material-ui@0.15.4 requires a peer of react@^15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN material-ui@0.15.4 requires a peer of react-dom@^15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN material-ui@0.15.4 requires a peer of react-tap-event-plugin@^1.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-addons-transition-group@15.6.2 requires a peer of react@^15.4.2 but none is installed. You must install peer dependencies yourself.
npm WARN react-transition-group@1.2.1 requires a peer of react@^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-transition-group@1.2.1 requires a peer of react-dom@^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-todo@1.0.0 No repository field.
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"})

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:\Users\user\AppData\Roaming\npm-cache\_logs\2019-06-30T15_13_48_387Z-debug.log

L:\NetProject\vscode-react-sample-master>

任何ide如何修复此错误?

那么,您所在的位置是否可以访问GitHub?有代理吗?我在瑞典,我可以访问GItHub,没有代理,我运行win 10计算机,所以打印的错误之一是python 2缺失。这是因为它正在尝试安装节点sass所需的节点gyp。该项目已经两年多没有更新了,这在前端领域是一个很长的时间。与其花时间尝试构建它,不如寻找更新的东西。你解决了这个问题吗?我也有。那么,在你的位置可以访问GitHub吗?有代理吗?我在瑞典,我可以访问GItHub,没有代理,我运行win 10计算机,所以打印的错误之一是python 2缺失。这是因为它正在尝试安装节点sass所需的节点gyp。该项目已经两年多没有更新了,这在前端领域是一个很长的时间。与其花时间尝试构建它,不如寻找更新的东西。你解决了这个问题吗?我有同样的。