Я пытаюсь опубликовать веб-приложение ASP.NET Core, используя dotnet publish
, и оно не удается из-за проблемы npm install
.
Я использую Mac OS X 10.13.4 (17E202)и .NET Core 2.1.300.
Воспроизвести шаги:
dotnet new react -o my-new-app
cd my-new-app
dotnet publish
Это вывод, который я получаю:
Microsoft (R) Build Engine version 15.7.179.6572 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restore completed in 48.68 ms for /Users/idoran/temp/test-react-app/test-react-app.csproj.
test-react-app -> /Users/idoran/temp/test-react-app/bin/Debug/netcoreapp2.1/test-react-app.dll
test-react-app -> /Users/idoran/temp/test-react-app/bin/Debug/netcoreapp2.1/test-react-app.Views.dll
v10.3.0
Restoring dependencies using 'npm'. This may take several minutes...
> uglifyjs-webpack-plugin@0.4.6 postinstall /Users/idoran/temp/test-react-app/ClientApp/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js
added 1177 packages from 753 contributors and audited 10541 packages in 11.124s
found 328 vulnerabilities (309 low, 15 moderate, 3 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details
> fsevents@1.1.2 install /Users/idoran/temp/test-react-app/ClientApp/node_modules/fsevents
> node install
node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.1.2 and node@10.3.0 (node-v64 ABI) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.1.2 and node@10.3.0 (node-v64 ABI) (falling back to source compile with node-gyp)
SOLINK_MODULE(target) Release/.node
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:85:
../src/methods.cc(14,12): warning G32017E20: 'Call' is deprecated [-Wdeprecated-declarations] [/Users/idoran/temp/test-react-app/test-react-app.csproj]
handler->Call(3, argv);
^
../../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
In file included from ../fsevents.cc:85:
../src/methods.cc(14,12): warning G32017E20: 'Call' is deprecated [-Wdeprecated-declarations] [/Users/idoran/temp/test-react-app/test-react-app.csproj]
handler->Call(3, argv);
^
../../nan/nan.h:1617:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../nan/nan.h:98:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
1 warning generated.
1 warning generated.
rm: ./Release/.deps/Release/obj.target/fse/fsevents.o.d.raw: No such file or directory
make: *** [Release/obj.target/fse/fsevents.o] Error 1
SOLINK_MODULE(target) Release/fse.node
gyp ERR! build error
EXEC : gyp ERR! stack error : `make` failed with exit code: 2 [/Users/idoran/temp/test-react-app/test-react-app.csproj]
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/idoran/temp/test-react-app/ClientApp/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/idoran/temp/test-react-app/ClientApp/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64' (1)
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/idoran/temp/test-react-app/ClientApp/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/idoran/temp/test-react-app/ClientApp/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64"
gyp ERR! cwd /Users/idoran/temp/test-react-app/ClientApp/node_modules/fsevents
gyp ERR! node -v v10.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
EXEC : node-pre-gyp ERR! stack error : Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/idoran/temp/test-react-app/ClientApp/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/idoran/temp/test-react-app/ClientApp/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64' (1) [/Users/idoran/temp/test-react-app/test-react-app.csproj]
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/idoran/temp/test-react-app/ClientApp/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
node-pre-gyp ERR! System Darwin 17.5.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/idoran/temp/test-react-app/ClientApp/node_modules/fsevents/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/idoran/temp/test-react-app/ClientApp/node_modules/fsevents
node-pre-gyp ERR! node -v v10.3.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok
COPY /Users/idoran/temp/test-react-app/ClientApp/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node
TOUCH Release/obj.target/action_after_build.stamp
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
audited 11312 packages in 13.477s
found 355 vulnerabilities (315 low, 30 moderate, 9 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details
/Users/idoran/temp/test-react-app/test-react-app.csproj(35,5): error MSB3073: The command "npm install" exited with code -1.