You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
internal/modules/cjs/loader.js:1089
throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
^
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: C:\web_test\gulpfile.js
require() of ES modules is not supported.
require() of МОЙ ПУТЬ\gulpfile.js from МОЙ ПУТЬ\AppData\Roaming\npm\node_modules\gulp\node_modules\gulp-cli\lib\versioned^4.0.0\index.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename gulpfile.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from C:\web_test\package.json.
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1089:13)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at execute (МОЙ ПУТЬ\AppData\Roaming\npm\node_modules\gulp\node_modules\gulp-cli\lib\versioned\^4.0.0\index.js:36:18)
at Liftoff.handleArguments (МОЙ ПУТЬ\AppData\Roaming\npm\node_modules\gulp\node_modules\gulp-cli\index.js:201:24)
at Liftoff.execute (МОЙ ПУТЬ\AppData\Roaming\npm\node_modules\gulp\node_modules\liftoff\index.js:201:12)
at module.exports (МОЙ ПУТЬ\AppData\Roaming\npm\node_modules\gulp\node_modules\flagged-respawn\index.js:51:3)
at Liftoff.<anonymous> (МОЙ ПУТЬ\AppData\Roaming\npm\node_modules\gulp\node_modules\liftoff\index.js:191:5) {
code: 'ERR_REQUIRE_ESM'
}
The text was updated successfully, but these errors were encountered:
@Eeesbk у меня было тоже самое после того как решил исправить зависимости в пакетах. Пробовал использовать разные версии ноды. Не помогло.
Вот что сделал чтобы восстановить:
node v14.17.5
internal/modules/cjs/loader.js:1089
throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
^
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: C:\web_test\gulpfile.js
require() of ES modules is not supported.
require() of МОЙ ПУТЬ\gulpfile.js from МОЙ ПУТЬ\AppData\Roaming\npm\node_modules\gulp\node_modules\gulp-cli\lib\versioned^4.0.0\index.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename gulpfile.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from C:\web_test\package.json.
code: 'ERR_REQUIRE_ESM'
}
The text was updated successfully, but these errors were encountered: