How to use the npmlog.error function in npmlog

To help you get started, we’ve selected a few npmlog examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github liquidg3 / altair / node_modules / npm / lib / utils / error-handler.js View on Github external
,"including the npm and node versions, at:"
                  ,"    "
                  ].join("\n"))
    printStack = false
    break
  }

  var os = require("os")
  // just a line break
  if (log.levels[log.level] <= log.levels.error) console.error("")
  log.error("System", os.type() + " " + os.release())
  log.error("command", process.argv
            .map(JSON.stringify).join(" "))
  log.error("cwd", process.cwd())
  log.error("node -v", process.version)
  log.error("npm -v", npm.version)

  ; [ "file"
    , "path"
    , "type"
    , "syscall"
    , "fstream_path"
    , "fstream_unc_path"
    , "fstream_type"
    , "fstream_class"
    , "fstream_finish_call"
    , "fstream_linkpath"
    , "code"
    , "errno"
    , "stack"
    , "fstream_stack"
    ].forEach(function (k) {
github rotundasoftware / parcelify / index.js View on Github external
_this.on( 'error', function( err ) {
			log.error( '', err ); // otherwise errors kill our watch task. Especially bad for transform errors
		} );
github graalvm / graaljs / deps / npm / node_modules / node-gyp / bin / node-gyp.js View on Github external
function errorMessage () {
  // copied from npm's lib/utils/error-handler.js
  var os = require('os')
  log.error('System', os.type() + ' ' + os.release())
  log.error('command', process.argv
    .map(JSON.stringify).join(' '))
  log.error('cwd', process.cwd())
  log.error('node -v', process.version)
  log.error('node-gyp -v', 'v' + prog.package.version)
}
github contentful / contentful-export / dist / usageParams.js View on Github external
}).config('config', 'Configuration file with required values').check(function (argv) {
  if (!argv.spaceId) {
    log.error('Please provide --space-id to be used to export \n' + 'For more info See: https://www.npmjs.com/package/contentful-export');
    process.exit(1);
  }
  if (!argv.managementToken) {
    log.error('Please provide --management-token to be used for export \n' + 'For more info See: https://www.npmjs.com/package/contentful-export');
    process.exit(1);
  }
  if (argv.includeDrafts && !argv.previewToken) {
    log.error('Please provide a preview API token to be able to get draft or set --include-drafts false');
    process.exit(1);
  }
  if (!argv.includeDrafts && argv.previewToken) {
    log.error('Please make sure to specify --include-drafts to be able to get drafts');
    process.exit(1);
  }

  return true;
}).argv;
github bitpay / bitcore-wallet-service / lib / blockchainmonitor.js View on Github external
self.storage.fetchAddress(out.address, function(err, address) {
      if (err) {
        log.error('Could not fetch addresses from the db');
        return next(err);
      }
      if (!address || address.isChange) return next();

      var walletId = address.walletId;
      log.info('Incoming tx for wallet ' + walletId + ' [' + out.amount + 'sat -> ' + out.address + ']');

      var notification = Notification.create({
        type: 'NewIncomingTx',
        data: {
          txid: data.txid,
          address: out.address,
          amount: out.amount,
        },
        walletId: walletId,
      });
github semantic-release / cli / src / lib / repository.js View on Github external
module.exports = async function(pkg, info) {
  let repoUrl;
  try {
    repoUrl = await getRemoteUrl(pkg);
  } catch (error) {
    log.error('Could not get repository url. Please create/add the repository.');
    throw error;
  }

  log.verbose(`Detected git url: ${repoUrl}`);
  info.giturl = repoUrl;
  const parsedUrl = parseGhUrl(repoUrl);

  if (!parsedUrl) {
    log.info('Not a reqular GitHub URL.');
    const eurl = url.parse(repoUrl);
    delete eurl.pathname;
    delete eurl.search;
    delete eurl.query;
    delete eurl.hash;

    const answers = await inquirer.prompt([
github nullivex / nodist / bin / node_modules / npm / lib / utils / tar.js View on Github external
.on("error", function (er) {
        if (er) log.error("tar.pack", "tar creation error", tarball)
        cb(er)
      })
      .pipe(zlib.Gzip())
github JCMais / node-libcurl / scripts / postinstall.js View on Github external
function printStandardLibError() {
  log.error('the latest libstdc++ is missing on your system!')
  log.error('On Ubuntu you can install it using:')
  log.error('$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test')
  log.error('$ sudo apt-get update')
  log.error('$ sudo apt-get install libstdc++-4.9-dev')
}
github liquidg3 / altair / node_modules / npm / lib / utils / error-handler.js View on Github external
,"File exists: "+er.path
              ,"Move it away, and try again."].join("\n"))
    break

  case "ENEEDAUTH":
    log.error("need auth", [er.message
              ,"You need to authorize this machine using `npm adduser`"
              ].join("\n"))
    break

  case "EPEERINVALID":
    var peerErrors = Object.keys(er.peersDepending).map(function (peer) {
      return "Peer " + peer + " wants " + er.packageName + "@"
        + er.peersDepending[peer]
    })
    log.error("peerinvalid", [er.message].concat(peerErrors).join("\n"))
    break

  case "ECONNRESET":
  case "ENOTFOUND":
  case "ETIMEDOUT":
    log.error("network", [er.message
              ,"This is most likely not a problem with npm itself"
              ,"and is related to network connectivity."
              ,"In most cases you are behind a proxy or have bad network settings."
              ,"\nIf you are behind a proxy, please make sure that the"
              ,"'proxy' config is set properly.  See: 'npm help config'"
              ].join("\n"))
    break

  case "ENOPACKAGEJSON":
    log.error("package.json", [er.message