首页 > 其他分享 >envinfo All In One

envinfo All In One

时间:2023-03-22 18:15:28浏览次数:34  
标签:node envinfo version https xgqfrms com

envinfo All In One

cli not work bug ❌

its stuck

$ npx envinfo

image

$ node  -v
# v16.14.2
$ npm -v
# 8.5.0
$ npx  -v
# 8.5.0

https://www.npmjs.com/package/envinfo

local install is OK ✅

$ npm install envinfo

bug.mjs

import envinfo from 'envinfo';

envinfo.run(
  {
    System: ['OS', 'CPU'],
    Binaries: ['Node', 'Yarn', 'npm'],
    Browsers: ['Chrome', 'Firefox', 'Safari'],
    npmPackages: ['styled-components', 'babel-plugin-styled-components'],
  },
  {
    json: true,
    showNotFound: true
  }
).then(env => console.log(env));
# ✅
$ node ./bug.mjs

{
  "System": {
    "OS": "macOS 12.3",
    "CPU": "(12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz"
  },
  "Binaries": {
    "Node": {
      "version": "16.14.2",
      "path": "~/.nvm/versions/node/v16.14.2/bin/node"
    },
    "Yarn": {
      "version": "1.22.4",
      "path": "~/.yarn/bin/yarn"
    },
    "npm": {
      "version": "8.5.0",
      "path": "~/.nvm/versions/node/v16.14.2/bin/npm"
    }
  },
  "Browsers": {
    "Chrome": {
      "version": "108.0.5359.124"
    },
    "Firefox": "Not Found",
    "Safari": {
      "version": "15.4"
    }
  },
  "npmPackages": {
    "babel-plugin-styled-components": "Not Found",
    "styled-components": "Not Found"
  }
}
image

(

标签:node,envinfo,version,https,xgqfrms,com
From: https://www.cnblogs.com/xgqfrms/p/17244971.html

相关文章