Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReferenceError: Promise is not defined

after pushing my data , i am trying to use from another server git.pull('site','site') but i get this Error.

 ReferenceError: Promise is not defined
at deferred (/root/home/flash/Site/node_modules/simple-git/src/util/deferred.js:4:20)
at Git._schedule (/root/home/flash/Site/node_modules/simple-git/src/git.js:1363:23)
at Git._run (/root/home/flash/Site/node_modules/simple-git/src/git.js:1346:12)
at Git.pull (/root/home/flash/Site/node_modules/simple-git/src/git.js:337:19)
at port (/root/home/flash/Site/server.js:588:11)
at Layer.handle [as handle_request] (/root/home/flash/Site/node_modules/express/lib/router/layer.js:95:5)
at next (/root/home/flash/Site/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/root/home/flash/Site/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/root/home/flash/Site/node_modules/express/lib/router/layer.js:95:5)
at /root/home/flash/Site/node_modules/express/lib/router/index.js:281:22

how to pull my data ??

*Note : When I type the command manually in the console it works (git pull site site) .

can someone help me please to solve this problem.

like image 565
Ahmad Rweashd Avatar asked Sep 11 '26 03:09

Ahmad Rweashd


1 Answers

You just need to install promise using cli:

npm install promise

Then add this to your code:

var Promise = require('promise');

For more detail go to: https://www.npmjs.com/package/nodegit-promise

like image 90
Bhagyashree Sarkar Avatar answered Sep 12 '26 17:09

Bhagyashree Sarkar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!