Answer the question
In order to leave comments, you need to log in
Error while building Gulp SyntaxError: Unexpected token, how to fix?
Good day
After reinstalling the system and trying to run gulp, I encountered this error.
I can't figure out what's wrong, before that everything worked.
Here is the error
/home/pishelevsky/Frontend Devoloper/Practic/1Github/Boosted/node_modules/globby/index.js:28
} catch {
^
SyntaxError: Unexpected token {
at new Script (vm.js:51:7)
at createScript (vm .js:136:10)
at Object.runInThisContext (vm.js:197:10)
at Module._compile (internal/modules/cjs/loader.js:618:28)
at Object.Module._extensions..js (internal /modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Module.require (internal/modules/cjs/loader .js:598:17)
at require (internal/modules/cjs/helpers.js:11:18
)
const checkCwdOption = (options = {}) => {
if (!options.cwd) {
return;
}
let stat;
try {
stat = fs.statSync(options.cwd)
} catch {
return
}
if (!stat.isDirectory()) {
throw new Error('The `cwd` option must be a path to a directory');
}
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question