Gulp crash when running on Windows | Error message: Microsoft JScript compilation error, invalid character

I installed Node.js on my local Windows 7 machine, as this link says:
install-node-js-npm-windows

After that, I installed Gulp.js using this command via the command line:

npm install -g gulp 

And then I add this path to the environment variable area:

C: \ Users \ Majid \ AppData \ Roaming \ NPM \ node_modules \ gulp \ Bin

Now when I try to run gulp with this command:

 gulp 

I got this error:

Gulp run error message

 Windows Script Host Line: 1 Char: 1 Error: Invalid character Code: 800A03F6 Source: Microsoft JScript compilation error 

How can I solve this error and how can I make gulp.js work on Windows?


CHANGE AFTER ANSWER:
The error still exists.
I went this way:

C: \ Users \ username \ AppData \ Roaming \ NPM \ node_modules \ gulp \ Bin

At the command prompt and tried this command:

 node gulp.js install 

But he says:

Gulpfile not found

You should know that gulp was successfully installed in the previous steps (with some warnings)
The gulp.js framework is designed for Linux-based operating systems.
I am looking for a way to make this file workable on windows os.



USING:
I want to run this javascript based website on my local machine ...
+5
source share
1 answer

You need to run "node node_modules \ gulp \ bin \ gulp.js install", just add the "node" command in front of it, and also refer to the link below for more

Error while working gulp on Windows 10

I can’t comment, but did you run "npm install" after formatting the repository to install package.json dependencies, dev-dependencies?

Gulp must be installed globally as well as in the current working directory.

Run the code below to install gulp globally and the other to install repository dependencies.

 npm install -g gulp npm install 

This answer is correct, but what was the problem on my side?
I should not add this path:

C: \ Users \ Majid \ AppData \ Roaming \ NPM \ node_modules \ gulp \ Bin

In the environment variable field.

I went to the root folder in cmd and reinstalled gulp globally and ran npm install and finally gulp watch . very good.

+4
source

All Articles