Npm安装尝试安装package.json中没有的依赖项并打印错误

s3fp2yjn  于 2023-02-16  发布在  其他
关注(0)|答案(1)|浏览(207)

在一个项目中,我第一次尝试npm安装,但是它尝试安装依赖项"js-xlsx",但是我在package.json中看不到它
此外,它打印错误,不能安装它,并安装没有别的.
npm安装时的错误:

npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\mingw64\bin\git.EXE ls-remote -h -t https://github.com/securedeveloper/js-xlsx.git
npm ERR!
npm ERR! fatal: unable to access 'https://github.com/securedeveloper/js-xlsx.git/': Could not resolve host: github.com
npm ERR!
npm ERR! exited with error code: 128

下面是我的package.json:

"dependencies": {
        "axios": "^0.17.1",
        "bootstrap": "^3.3.7",
        "chart.js": "^2.4.0",
        "create-react-class": "^15.6.3",
        "fixed-data-table": "^0.6.3",
        "jsx-to-string": "^1.0.2",
        "lodash": "^4.17.5",
        "moment": "^2.18.1",
        "object-unfreeze": "^1.1.0",
        "react": "^15.5.4",
        "react-bootstrap": "^0.30.7",
        "react-calendar-timeline": "^0.15.12",
        "react-chartjs-2": "^2.1.0",
        "react-data-export": "^0.4.2",
        "react-dom": "^15.5.4",
        "react-grid-layout": "^0.16.0",
        "react-notification-system": "^0.2.16",
        "react-redux": "^5.0.1",
        "react-router": "^3.0.0",
        "react-treebeard": "^2.0.3",
        "redux": "^3.6.0",
        "xhr": "^2.4.0"
      },
  "devDependencies": {
    "babel-core": "^6.26.3",
    "babel-loader": "^7.1.4",
    "babel-preset-env": "^1.7.0",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-react": "^6.24.1",
    "clean-webpack-plugin": "^0.1.19",
    "css-entry-webpack-plugin": "^1.0.0-beta.4",
    "css-loader": "^0.28.11",
    "enzyme": "^3.3.0",
    "enzyme-adapter-react-15": "^1.0.5",
    "eslint": "^4.19.1",
    "eslint-plugin-react": "^7.6.1",
    "file-loader": "^1.1.11",
    "html-webpack-plugin": "^3.2.0",
    "identity-obj-proxy": "^3.0.0",
    "jest": "^23.1.0",
    "jest-sonar-reporter": "^2.0.0",
    "mini-css-extract-plugin": "^0.4.0",
    "mock-local-storage": "^1.0.5",
    "optimize-css-assets-webpack-plugin": "^4.0.2",
    "react-css-modules": "^4.1.0",
    "react-datetime": "^2.8.9",
    "react-test-renderer": "^15.6.2",
    "style-loader": "^0.16.1",
    "uglifyjs-webpack-plugin": "^1.2.5",
    "webpack": "^4.20.2",
    "webpack-cli": "^3.1.1",
    "webpack-dev-server": "^3.1.4",
    "webpack-merge": "^4.1.2"
  },

为什么它要安装它?它是否需要它作为其他依赖项?
我该怎么解决这个问题?

tjjdgumg

tjjdgumg1#

因此,我不仅需要配置npm的代理,还需要配置git:
git配置--全局http.代理http://proxyUsername:proxyPassword@proxy.server.com:端口
git配置--全局https。代理http://proxyUsername:proxyPassword@proxy.server.com:端口
git配置http. ssl验证是否为假

相关问题