Я новичок в React и прохожу этот GitHub microsoft / vscode-реагировать-образец
Я скачал zip-архив с GitHub и открыл его в коде Visual Studio.
Я получаю эту ошибку при запуске внешнего интерфейса.
Когда я пытаюсь установить его так:
npm install node-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>
Есть идеи, как исправить эту ошибку?