gulp打包任务-ReferenceError:未定义原始字符串

问题描述 投票:0回答:1

团队,

我的Ci管道蔚蓝失败,请在下面找到错误。我尝试过How to fix ReferenceError: primordials is not defined in node的解决方案,但没有运气

以下错误:

##[section]Starting: gulp Package-Generate
==============================================================================
Task         : Gulp
Description  : Node.js streaming task based build system
Version      : 0.141.2
Author       : Microsoft Corporation
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=613721)
==============================================================================
[command]C:\npm\prefix\gulp.cmd Package-Generate --gulpfile d:\a\1\s\gulpfile.js --configuration release
fs.js:27
const { Math, Object } = primordials;
                         ^

ReferenceError: primordials is not defined
    at fs.js:27:26
    at req_ (d:\a\1\s\node_modules\natives\index.js:143:24)
    at Object.req [as require] (d:\a\1\s\node_modules\natives\index.js:55:10)
    at Object.<anonymous> (d:\a\1\s\node_modules\graceful-fs\fs.js:1:37)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:849:19)
    at require (internal/modules/cjs/helpers.js:74:18)
##[error]Gulp failed with error: C:\npm\prefix\gulp.cmd failed with return code: 1
##[section]Finishing: gulp Package-Generate
node.js gulp saas gulp-sass sitecore-habitat
1个回答
0
投票

如果使用的是Microsoft托管代理,则nodejs的版本为automatically updated到最新的LTS。

所以现在您必须更新您的内部版本才能使用Gulp4。我发现this blog对迁移很有帮助。

© www.soinside.com 2019 - 2024. All rights reserved.