【发布时间】:2018-08-10 08:39:27
【问题描述】:
我有一个 react 项目,在本地我只使用 yarn install、yarn build 和 yarn start 在https://localhost:3000 测试它
但是我在日志中有这个错误:
2018-08-10T08:31:34.6206910Z ##[section]Starting: Yarn build
2018-08-10T08:31:34.6211162Z ==============================================================================
2018-08-10T08:31:34.6211307Z Task : Yarn task
2018-08-10T08:31:34.6211411Z Description : Executes Yarn
2018-08-10T08:31:34.6211531Z Version : 2.5.999
2018-08-10T08:31:34.6211633Z Author : Geek Learning
2018-08-10T08:31:34.6211842Z Help : [More Information](https://github.com/geeklearningio/gl-vsts-tasks-yarn/wiki/Yarn) (Version 2.5.999).
Dear Angular and Ember CLI users, please check our [known issues](https://github.com/geeklearningio/gl-vsts-tasks-yarn/wiki/Known-Issues)
2018-08-10T08:31:34.6212057Z ==============================================================================
2018-08-10T08:31:35.2261051Z [command]C:\Windows\system32\cmd.exe /D /S /C "C:\hostedtoolcache\windows\yarn\1.9.4\x64\yarn-v1.9.4\bin\yarn.cmd build"
2018-08-10T08:31:42.0864621Z yarn run v1.9.4
2018-08-10T08:31:42.1571684Z error Couldn't find a package.json file in "C:\\"
2018-08-10T08:31:42.1572901Z info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
2018-08-10T08:31:42.1822978Z ##[error]Error: C:\hostedtoolcache\windows\yarn\1.9.4\x64\yarn-v1.9.4\bin\yarn.cmd failed with return code: 1
2018-08-10T08:31:42.1893252Z ##[section]Finishing: Yarn build
但其实有一个package.json
【问题讨论】:
-
你这边的这个问题呢?根据最新的消息,似乎你已经解决了上一个问题,对于新问题“Directory xxx is empty. nothing will be added to build artifact”,看来你没有复制任何东西到$(Build.artifactstagingdirectory ) 在您的定义中,您是否错过了发布工件之前的“复制文件”任务?如果您获得任何最新信息,请随时在此处分享。
标签: reactjs msbuild azure-devops yarnpkg