I come to you because for days I haven't had the solution to my problem.
Version: CLI version: 2.3.0 Local version: 3.9.1
Node: v12.18.4
When I launch my command yarn run dev (or to make simpler gulp dev) so my task is dev, well parameter I have a problem, the dev before me realized this code:
const path = require('path');
// Filters out non .js files. Prevents
// accidental inclusion of possible hidden files
export default function(name) {
return /(\.(js)$)/i.test(path.extname(name));
};
And here is the error which follows:
yarn run v1.22.5
$ cross-env BABEL_DISABLE_CACHE=1 NODE_ENV=development ./node_modules/.bin/gulp dev
[12:04:55] Requiring external module @babel/register
/Users/nicolas/vanam_dev/frontend/gulp/util/scriptFilter.js:5
export default function (name) {
^^^^^^
SyntaxError: Unexpected token 'export'
at wrapSafe (internal/modules/cjs/loader.js:1053:16)
at Module._compile (internal/modules/cjs/loader.js:1101:27)
at Module._compile (/Users/nicolas/vanam_dev/frontend/node_modules/pirates/lib/index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Object.newLoader [as .js] (/Users/nicolas/vanam_dev/frontend/node_modules/pirates/lib/index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/Users/nicolas/vanam_dev/frontend/gulp/index.js:3:19)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Thank you in advance, I hope you will be able to unlock me.