Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Gulp throws Requiring external module babel-registererror #15

Open
Nahdus opened this issue Jul 7, 2022 · 3 comments
Open

Running Gulp throws Requiring external module babel-registererror #15

Nahdus opened this issue Jul 7, 2022 · 3 comments

Comments

@Nahdus
Copy link

Nahdus commented Jul 7, 2022

  1. Did '''npm install'''

  2. Tried running '''gulp '''

Got the following error

[21:03:57] Requiring external module babel-register
assert.js:341
    throw err;
    ^

AssertionError [ERR_ASSERTION]: Task function must be specified
    at Gulp.set [as _setTask] (E:\opensource\Design-Patterns-in-Javascript\node_modules\undertaker\lib\set-task.js:10:3)
    at Gulp.task (E:\opensource\Design-Patterns-in-Javascript\node_modules\undertaker\lib\task.js:13:8)
    at Object.<anonymous> (E:/opensource/Design-Patterns-in-Javascript/gulpfile.babel.js:47:6)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
    at loader (E:\opensource\Design-Patterns-in-Javascript\node_modules\babel-register\lib\node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (E:\opensource\Design-Patterns-in-Javascript\node_modules\babel-register\lib\node.js:154:7)
    at Module.load (internal/modules/cjs/loader.js:685:32)
    at Function.Module._load (internal/modules/cjs/loader.js:620:12)
    at Module.require (internal/modules/cjs/loader.js:723:19)
    at require (internal/modules/cjs/helpers.js:14:16)

E:\opensource\Design-Patterns-in-Javascript>gulp
[21:06:21] Requiring external module babel-register
node:assert:399
    throw err;
    ^

AssertionError [ERR_ASSERTION] [ERR_ASSERTION]: Task function must be specified
    at Gulp.set [as _setTask] (E:\opensource\Design-Patterns-in-Javascript\node_modules\undertaker\lib\set-task.js:10:3)
    at Gulp.task (E:\opensource\Design-Patterns-in-Javascript\node_modules\undertaker\lib\task.js:13:8)
    at Object.<anonymous> (E:/opensource/Design-Patterns-in-Javascript/gulpfile.babel.js:47:6)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at loader (E:\opensource\Design-Patterns-in-Javascript\node_modules\babel-register\lib\node.js:144:5)
    at Object.require.extensions.<computed> [as .js] (E:\opensource\Design-Patterns-in-Javascript\node_modules\babel-register\lib\node.js:154:7)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18) {
  generatedMessage: false,
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '=='
}```
@Nahdus
Copy link
Author

Nahdus commented Jul 7, 2022

Using node version 16.15,1

@Painter-Of-Wind
Copy link

same problem

@yzkkunshao
Copy link

#15 (comment)
try as below👇:
nvm use 8.17.0
then execute gulp
The program will run smoothly without any issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants