我在React App中有gulpfile.js。
在Azure Pipeline中,我有3个任务
- 安装节点版本
- 安装npm
- 吞下
displayName: Run gulp
inputs:
gulpFile: ${{parameters.gulpFilePath}}
targets:
arguments: 'production'
gulpjs: 'node_modules/gulp/bin/gulp.js'
enableCodeCoverage: false
但这里我得到下面的错误x1c 0d1x
I followed from stackoverflow as well
但不明白我在哪里必须添加这行代码在我的gulp任务**--max_old_space_size=4096**
我试着添加一些不同的方法,但它总是失败。我也在下面的脚本喜欢通过
task: PowerShell@2
displayName: Run npm install
inputs:
targetType: 'inline'
script: |
cd ${{parameters.reactAppPath}}
npm install
gulp --max_old_space_size=4096 --gulpfile ${{parameters.gulpFilePath}} production
然后得到下面的错误
请帮帮我谢谢你的帮助
1条答案
按热度按时间pvabu6sv1#
当您的Pipeline无法在您的存储库中找到gulpfile.js时,会发生No gulp file found错误。
我的Reactapp仓库,带有gulpfile.js:-
要安装和运行gulp的Azure yaml代码:-
我已经将文件路径添加到我的gulpfile.js和react app中,然后在运行gulp任务中引用它,如下所示:
完整yaml代码:-
输出:-