Reactjs应用程序Azure部署失败

时间:2017-09-05 15:52:36

标签: reactjs azure npm azure-web-sites

我正在尝试在Azure云平台上部署我的reactjs应用程序。我已将git repo设置为部署选项/源。我的部署失败了。我看到很多npm错误。在azure的错误日志中我得到了这个

Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling node.js deployment.
KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot'
Copying file: '.idea\workspace.xml'
Copying file: 'node_modules\.bin\modernizr'
Copying file: 'node_modules\@trendmicro\react-toggle-switch\LICENSE'
Copying file: 'node_modules\@trendmicro\react-toggle-switch\package.json'
Copying file: 'node_modules\@trendmicro\react-toggle-switch\README.md'
Copying file: 'node_modules\@trendmicro\react-toggle-switch\dist\react-toggle-switch.css'
Copying file: 'node_modules\@trendmicro\react-toggle-switch\dist\react-toggle-switch.css.map'
Copying file: 'node_modules\@trendmicro\react-toggle-switch\dist\react-toggle-switch.min.css'
Copying file: 'node_modules\@trendmicro\react-toggle-switch\lib\index.js'
Copying file: 'node_modules\@trendmicro\react-toggle-switch\lib\index.js.map'
Copying file: 'node_modules\bez\bower.json'
Copying file: 'node_modules\bez\jquery.bez.min.js'
Copying file: 'node_modules\bez\LICENSE.txt'
Copying file: 'node_modules\bez\Makefile'
Copying file: 'node_modules\bez\package.json'
Copying file: 'node_modules\bez\README.md'
Copying file: 'node_modules\bez\src\jquery.bez.js'
Copying file: 'node_modules\bootstrap\CHANGELOG.md'
Copying file: 'node_modules\bootstrap\Gruntfile.js'
Copying file: 'node_modules\bootstrap\LICENSE'
Copying file: 'node_modules\bootstrap\package.json'
Copying file: 'node_modules\bootstrap\README.md'
Copying file: 'node_modules\bootstrap\dist\css\bootstrap-theme.css'
Copying file: 'node_modules\bootstrap\dist\css\bootstrap-theme.css.map'
Copying file: 'node_modules\bootstrap\dist\css\bootstrap-theme.min.css'
Copying file: 'node_modules\bootstrap\dist\css\bootstrap-theme.min.css.map'
Copying file: 'node_modules\bootstrap\dist\css\bootstrap.css'
Copying file: 'node_modules\bootstrap\dist\css\bootstrap.css.map'
Copying file: 'node_modules\bootstrap\dist\css\bootstrap.min.css'
Copying file: 'node_modules\bootstrap\dist\css\bootstrap.min.css.map'
Copying file: 'node_modules\bootstrap\dist\fonts\glyphicons-halflings-regular.eot'
Copying file: 'node_modules\bootstrap\dist\fonts\glyphicons-halflings-regular.svg'
Copying file: 'node_modules\bootstrap\dist\fonts\glyphicons-halflings-regular.ttf'
Copying file: 'node_modules\bootstrap\dist\fonts\glyphicons-halflings-regular.woff'
Copying file: 'node_modules\bootstrap\dist\fonts\glyphicons-halflings-regular.woff2'
Copying file: 'node_modules\bootstrap\dist\js\bootstrap.js'
Copying file: 'node_modules\bootstrap\dist\js\bootstrap.min.js'
Copying file: 'node_modules\bootstrap\dist\js\npm.js'
Copying file: 'node_modules\bootstrap\fonts\glyphicons-halflings-regular.eot'
Copying file: 'node_modules\bootstrap\fonts\glyphicons-halflings-regular.svg'
Copying file: 'node_modules\bootstrap\fonts\glyphicons-halflings-regular.ttf'
Copying file: 'node_modules\bootstrap\fonts\glyphicons-halflings-regular.woff'
Copying file: 'node_modules\bootstrap\fonts\glyphicons-halflings-regular.woff2'
Copying file: 'node_modules\bootstrap\grunt\.jshintrc'
Copying file: 'node_modules\bootstrap\grunt\bs-commonjs-generator.js'
Copying file: 'node_modules\bootstrap\grunt\bs-glyphicons-data-generator.js'
Copying file: 'node_modules\bootstrap\grunt\bs-lessdoc-parser.js'
Copying file: 'node_modules\bootstrap\grunt\bs-raw-files-generator.js'
Copying file: 'node_modules\bootstrap\grunt\change-version.js'
Omitting next output lines...
Processed 485 files...
Processed 1008 files...
Processed 1393 files...
Processed 1755 files...
Using start-up script build/server-bundle.js from package.json.
Generated web.config.
Node.js versions available on the platform are: 0.6.20, 0.8.2, 0.8.19, 0.8.26, 0.8.27, 0.8.28, 0.10.5, 0.10.18, 0.10.21, 0.10.24, 0.10.26, 0.10.28, 0.10.29, 0.10.31, 0.10.32, 0.10.40, 0.12.0, 0.12.2, 0.12.3, 0.12.6, 4.0.0, 4.1.0, 4.1.2, 4.2.1, 4.2.2, 4.2.3, 4.2.4, 4.3.0, 4.3.2, 4.4.0, 4.4.1, 4.4.6, 4.4.7, 4.5.0, 4.6.0, 4.6.1, 4.8.4, 5.0.0, 5.1.1, 5.3.0, 5.4.0, 5.5.0, 5.6.0, 5.7.0, 5.7.1, 5.8.0, 5.9.1, 6.0.0, 6.1.0, 6.2.2, 6.3.0, 6.5.0, 6.6.0, 6.7.0, 6.9.0, 6.9.1, 6.9.2, 6.9.4, 6.9.5, 6.10.0, 6.11.1, 6.11.2, 7.0.0, 7.1.0, 7.2.0, 7.3.0, 7.4.0, 7.5.0, 7.6.0, 7.7.4, 7.10.0, 7.10.1, 8.0.0, 8.1.4, 8.4.0.
Selected node.js version 7.4.0. Use package.json file to choose a different version.
Selected npm version 3.9.5
Updating iisnode.yml at D:\home\site\wwwroot\build\iisnode.yml

> react-bootstrap-select@0.14.0 postinstall D:\home\site\wwwroot\node_modules\react-bootstrap-select
> jsx jsx/ dist/

'jsx' is not recognized as an internal or external command,
operable program or batch file.
tessact@0.0.1 D:\home\site\wwwroot
+-- @trendmicro/react-toggle-switch@0.5.5 
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
+-- bez@0.1.0 
+-- bootstrap@3.3.7 
+-- bootstrap-select@1.12.4 
+-- bootstrap-slider@9.8.0 
+-- bootstrap-tagsinput@0.7.1  extraneous
+-- css-loader@0.23.1 
+-- ion-rangeslider@2.1.7  extraneous
+-- isotope-layout@3.0.4  extraneous
+-- jquery@3.2.1 
+-- jquery-bridget@2.0.1  extraneous
+-- jquery-unveil@1.3.2 
+-- jquery.actual@1.0.19 
+-- jquery.scrollbar@0.2.11 
+-- modernizr@3.5.0 
+-- nouislider@10.0.0 
+-- pace-js@1.0.2 
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.1.2
+-- rc-slider@8.0.2  extraneous
npm WARN react-addons-test-utils@15.6.0 requires a peer of react-dom@^15.4.2 but none was installed.
npm WARN react-native@0.39.2 requires a peer of react@~15.4.0-rc.4 but none was installed.
+-- UNMET PEER DEPENDENCY react@15.3.2
npm WARN tessact@0.0.1 No repository field.
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "D:\\Program Files (x86)\\nodejs\\7.4.0\\node.exe" "D:\\Program Files (x86)\\npm\\3.9.5\\node_modules\\npm\\bin\\npm-cli.js" "install" "--production"
npm ERR! node v7.4.0
npm ERR! npm  v3.9.5
npm ERR! code ELIFECYCLE

npm ERR! react-bootstrap-select@0.14.0 postinstall: `jsx jsx/ dist/`
+-- react-addons-test-utils@15.6.0 
npm ERR! Exit status 1
+-- react-custom-scrollbars@4.1.2 
npm ERR! 
+-- UNMET PEER DEPENDENCY react-dom@15.3.2
npm ERR! Failed at the react-bootstrap-select@0.14.0 postinstall script 'jsx jsx/ dist/'.
+-- react-modal@2.2.4 
npm ERR! Make sure you have the latest version of node.js and npm installed.
+-- react-nouislider@2.0.0 
npm ERR! If you do, this is most likely a problem with the react-bootstrap-select package,
+-- react-scrollbars@0.0.5 
npm ERR! not with npm itself.
+-- react-select2-datga-wrapper@0.0.8  extraneous
npm ERR! Tell the author that this fails on your system:
+-- react-select2-wrapper@1.0.4-beta5  extraneous
npm ERR!     jsx jsx/ dist/
+-- react-switchery@1.1.3 
npm ERR! You can get information on how to open an issue for this project with:
+-- react-tag-input@4.7.2 
npm ERR!     npm bugs react-bootstrap-select
+-- react-toggle-switch@2.1.4 
npm ERR! Or if that isn't available, you can get their info via:
+-- select2@4.0.3 
npm ERR!     npm owner ls react-bootstrap-select
+-- shallow-equal-fuzzy@0.0.2 
npm ERR! There is likely additional logging output above.
`-- url-loader@0.5.8 


npm ERR! Please include the following file with any support request:
Failed exitCode=1, command="D:\Program Files (x86)\nodejs\7.4.0\node.exe" "D:\Program Files (x86)\npm\3.9.5\node_modules\npm\bin\npm-cli.js" install --production
npm ERR!     D:\home\site\wwwroot\npm-debug.log
An error has occurred during web site deployment.
'jsx' is not recognized as an internal or external command,\r\noperable program or batch file.\r\nnpm WARN optional Skipping failed optional dependency /chokidar/fsevents:\r\nnpm WARN notsup Not compatible with your operating system or architecture: fsevents@1.1.2\r\nnpm WARN react-addons-test-utils@15.6.0 requires a peer of react-dom@^15.4.2 but none was installed.\r\nnpm WARN react-native@0.39.2 requires a peer of react@~15.4.0-rc.4 but none was installed.\r\nnpm WARN tessact@0.0.1 No repository field.\r\nnpm ERR! Windows_NT 6.2.9200\r\nnpm ERR! argv "D:\\Program Files (x86)\\nodejs\\7.4.0\\node.exe" "D:\\Program Files (x86)\\npm\\3.9.5\\node_modules\\npm\\bin\\npm-cli.js" "install" "--production"\r\nnpm ERR! node v7.4.0\r\nnpm ERR! npm  v3.9.5\r\nnpm ERR! code ELIFECYCLE\r\n\r\nnpm ERR! react-bootstrap-select@0.14.0 postinstall: `jsx jsx/ dist/`\r\nnpm ERR! Exit status 1\r\nnpm ERR! \r\nnpm ERR! Failed at the react-bootstrap-select@0.14.0 postinstall script 'jsx jsx/ dist/'.\r\nnpm ERR! Make sure you have the latest version of node.js and npm installed.\r\nnpm ERR! If you do, this is most likely a problem with the react-bootstrap-select package,\r\nnpm ERR! not with npm itself.\r\nnpm ERR! Tell the author that this fails on your system:\r\nnpm ERR!     jsx jsx/ dist/\r\nnpm ERR! You can get information on how to open an issue for this project with:\r\nnpm ERR!     npm bugs react-bootstrap-select\r\nnpm ERR! Or if that isn't available, you can get their info via:\r\nnpm ERR!     npm owner ls react-bootstrap-select\r\nnpm ERR! There is likely additional logging output above.\r\n\r\nnpm ERR! Please include the following file with any support request:\r\nnpm ERR!     D:\home\site\wwwroot\npm-debug.log\r\nD:\Program Files (x86)\SiteExtensions\Kudu\65.60827.2986\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"

我尝试过runnig npm install,但这也没有任何区别。之前我部署了应用程序并且成功了。我该如何解决?

1 个答案:

答案 0 :(得分:0)

  

'jsx'未被识别为内部或外部命令,可操作程序或批处理文件。

错误是自我解释。在远程服务器上构建您的react应用程序时,首先需要安装JSX编译器工具包。 在Azure Web App上,您可以使用以下命令在Kudu控制台(https://<your-app-name>.scm.azurewebsites.net/DebugConsole)中安装它。

npm install -g jsx