A
A
Al2016-06-27 15:16:23
JavaScript
Al, 2016-06-27 15:16:23

GulpJS, how to fix "SyntaxError: Octal literals are not allowed in strict mode" error?

There is an application, gulp tasks are initialized inside it, due to the fact that the application is launched in strict mode, the node throws an error SyntaxError: Octal literals are not allowed in strict mode.

I understand that this is due to the fact that gulp uses an outdated version of graceful-fs. I tried to put gulp 4 but it didn't help, other errors appeared. Then I rummaged and found where the error is in the file \node_modules\gulp\node_modules\vinyl-fs\node_modules\glob-watcher\node_modules\gaze\node_modules\globule\node_modules\glob\node_modules\graceful-fs\graceful-fs.js :80 needs to be changed in line open(req.path, req.flags || "r", req.mode || 0777, req.cb) value 0777 to 0o777then everything works. But this is not an option, as I will not tell everyone who uses my application that gulp needs to be fixed.
Does anyone know how to avoid this problem with running in strict mode?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan, 2016-06-27
@LiguidCool

Offer the author a fix on github? When the fixed version is released, specify its minimum version in the dependencies.
As a temporary option - these are all text files - let your script find and edit the desired file during initialization.

A
Artem Kayun, 2016-06-27
@Kayun

What node do you have? It also swears at graceful-fs for me, but only with a warning, the rest of the script works correctly.
node v6.2.1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question