What is superagent-proxy?

#1

I am trying to provision and getting this error:

module.js:471
throw err;
^

Error: Cannot find module 'superagent-proxy’
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.result.adminServer (net.js:63:5)
at eval (provisioner.js:28:22)
at /usr/local/share/c3/nodeapps/prov/node_modules/async/lib/async.js:607:21
at /usr/local/share/c3/nodeapps/prov/node_modules/async/lib/async.js:246:17
at iterate (/usr/local/share/c3/nodeapps/prov/node_modules/async/lib/async.js:146:13)
at /usr/local/share/c3/nodeapps/prov/node_modules/async/lib/async.js:157:25

Any thoughts on where it comes from and how to resolve this dependency?

#2

Get the latest version of c3-prov and install it.

#3

Superagent-proxy provides HTTP proxy support to NPM and C3 Provisioner. As this is a new dependency, I recommend you uninstall and re-install c3-prov

$ c3-prov uninstall
$ c3-prov install

#4

Thanks,

FYI - I think as a general solution, simple install and re-install would be the right answer. In my case, turned out the following was also required (When after re-installing did not work, I did this afterwards and got past the problem)

cd /usr/local/share/c3/nodeapps/prov/
npm install superagent-proxy

Perhaps this is unexpected - but it is what worked.

Paul

#5

I have the same problem as @paulyip .
I run c3-prov uninstall,
and then c3-prov install, then I see the following output:

Detecting Node.js installation…
Node.js v6.9.4 detected.
Removing /usr/local/share/c3/nodeapps/prov…
Installing dependencies at /usr/local/share/c3/nodeapps/prov
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

fsevents@0.3.8 install /usr/local/share/c3/nodeapps/prov/node_modules/fsevents
node-gyp rebuild

SOLINK_MODULE(target) Release/.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
CXX(target) Release/obj.target/fse/fsevents.o
In file included from …/fsevents.cc:85:
…/src/methods.cc:14:12: warning: ‘Call’ is deprecated [-Wdeprecated-declarations]
handler->Call(3, argv);
^
…/…/nan/nan.h:1618:3: note: ‘Call’ has been explicitly marked deprecated here
Call(int argc, v8::Localv8::Value argv[]) const {
^
1 warning generated.
SOLINK_MODULE(target) Release/fse.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
npm WARN saveError ENOENT: no such file or directory, open ‘/usr/local/share/c3/nodeapps/prov/package.json’
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open ‘/usr/local/share/c3/nodeapps/prov/package.json’
npm WARN prov No description
npm WARN prov No repository field.
npm WARN prov No README data
npm WARN prov No license field.

  • commander@2.7.1
  • archiver@0.14.3
  • superagent@1.1.0
  • node-dir@0.1.6
  • rimraf@2.3.2
  • ansimd@0.2.1
  • node-xml-lite@0.0.3
  • colors@1.0.3
  • glob@5.0.3
  • graceful-fs@4.1.3
  • chokidar@1.0.1
  • less@2.6.1
  • toposort@0.2.12
    added 171 packages from 175 contributors in 6.231s
    Cannot find c3.js or package.json.

What should I do to reinstall c3-prov?

#6

You have to reinstall c3-prov