telerik / kendo-ui-core

An HTML5, jQuery-based widget library for building modern web apps.
http://www.telerik.com/kendo-ui
Other
2.54k stars 1.91k forks source link

An error is thrown building the source code with gulp when node 12 is used. #6209

Closed mparvanov closed 2 years ago

mparvanov commented 3 years ago

Bug report

The following error is thrown when trying to build the source code with gulp and use Node version 12 ReferenceError: primordials is not defined

Reproduction of the problem

Using Node version 12 try to create a custom script based on the following article: https://docs.telerik.com/kendo-ui/intro/installation/what-you-need#using-gulp

Current behavior

parvanov@parvanovlap MINGW64 /c/work/kendo/src (master)
$ nvm use 12.19.0
Now using node v12.19.0 (64-bit)

parvanov@parvanovlap MINGW64 /c/work/kendo/src (master)
$ gulp --version
CLI version: 2.3.0
Local version: 3.9.1

parvanov@parvanovlap MINGW64 /c/work/kendo/src (master)
$ gulp custom -c autocomplete,dropdownlist
[11:36:19] Working directory changed to C:\work\kendo
ReferenceError: primordials is not defined
    at fs.js:36:5
    at req_ (C:\work\kendo\node_modules\natives\index.js:143:24)
    at Object.req [as require] (C:\work\kendo\node_modules\natives\index.js:55:10)
    at Object.<anonymous> (C:\work\kendo\node_modules\graceful-fs\fs.js:1:37)
    at Module._compile (internal/modules/cjs/loader.js:1015:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
    at Module.load (internal/modules/cjs/loader.js:879:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:903:19)
    at require (internal/modules/cjs/helpers.js:74:18)

Expected/desired behavior

The source is built successfully as with node 10: $ nvm use 10.16.3 Now using node v10.16.3 (64-bit)

parvanov@parvanovlap MINGW64 /c/work/kendo/src (master)

$ gulp custom -c autocomplete,dropdownlist
[11:35:44] Working directory changed to C:\work\kendo
[11:35:47] Using gulpfile C:\work\kendo\gulpfile.js
[11:35:47] Starting 'custom'...
[11:35:48] skipping  C:\work\kendo\src\kendo.core.js
[11:35:48] skipping  C:\work\kendo\src\kendo.data.odata.js
[11:35:48] skipping  C:\work\kendo\src\kendo.data.xml.js
[11:35:48] skipping  C:\work\kendo\src\kendo.data.js
[11:35:48] skipping  C:\work\kendo\src\kendo.popup.js
[11:35:48] skipping  C:\work\kendo\src\kendo.list.js
[11:35:48] skipping  C:\work\kendo\src\kendo.fx.js
[11:35:48] skipping  C:\work\kendo\src\kendo.userevents.js
[11:35:48] skipping  C:\work\kendo\src\kendo.draganddrop.js
[11:35:48] skipping  C:\work\kendo\src\kendo.mobile.scroller.js
[11:35:48] skipping  C:\work\kendo\src\kendo.virtuallist.js
[11:35:48] src//kendo.custom.js  ->  src/kendo.custom.min.js
[11:35:51] src//kendo.custom.min.js  ->  src/kendo.custom.min.map
[11:35:51] uglify complete
[11:35:51] source map complete!
[11:35:51] Finished 'custom' after 3.55 s

https://www.telerik.com/forums/custom-packages-and-node-js-v12

Environment

YKdvd commented 3 years ago

[I made the original forum report] You'll likely have to upgrade to use the current Gulp@4 - Gulp v3 is broken under Node 12: https://github.com/gulpjs/gulp/issues/2324 Hopefully your gulpfile.js may be simple enough to make this fairly painless - I think one of the breaking changes was to .task() with dependencies, which you don't seem to have, but I don't really know gulp and npm and didn't try digging into all the other dependencies in there once I reverted to Node.js v10.

NikoPenev21 commented 3 years ago

Reported also in Feedback portal image

veselints commented 2 years ago

Node version used has been bumped to 14 and Gulp to 4: https://github.com/telerik/kendo/pull/14445