无法使用yarn安装调试-收到“警告模式[“ debug@^4.1.1”]试图在同一目的地解压缩”

时间:2019-09-19 15:52:19

标签: node.js npm yarnpkg

我正在尝试使用yarn安装调试(https://www.npmjs.com/package/debug

yarn add debug --dev

但出现以下错误

  

警告模式[“ debug@^4.1.1”]试图将其解压缩   目的地   “ /Users/abc/Library/Caches/Yarn/v4/npm-debug-4.1.1-3b72260255109109c6b589cee050f1d516139664791/node_modules/debug”   作为模式   [“ debug@^4.1.0”,“ debug@^4.1.0”,“ debug@^4.0.1”,“ debug@^4.1.1”,“ debug@^4.1.0”,“ debug @ ^ 4.1.0“]。   这可能会导致不确定行为,从而跳过。

我已经看过这篇文章(What does Yarn (really) mean by "warning Pattern ["debug@^4.1.1"] is trying to unpack in the same destination"),并删除了所引用的debug目录及其上方的目录,但是没有任何效果。我已经删除了node_modules,已经添加和删除了debug了几次,但是并不能解决问题。

我什至尝试使用npm进行安装,但安装时没有出现任何错误,但是在生成程序时我得到了

  

未捕获的TypeError:调试不是函数       在Object.parcelRequire.redux / configure-store.js。@ babel / runtime / helpers / toConsumableArray   (configure-store.js:6)

有人有什么建议吗?我在下面包含了我的package.json:

{
  "name": "smart",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "dev": "parcel ./src/index.html",
    "lint": "eslint \"src/**/*.{js,jsx}\" --quiet",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@babel/cli": "^7.6.0",
    "@babel/core": "^7.6.0",
    "@babel/plugin-transform-runtime": "^7.5.5",
    "@babel/preset-env": "^7.6.0",
    "babel-eslint": "^10.0.3",
    "babel-preset-react": "^7.0.0-beta.3",
    "eslint": "^6.2.2",
    "eslint-config-prettier": "^6.1.0",
    "jest": "^24.9.0",
    "parcel-bundler": "^1.12.3",
    "prettier": "^1.18.2"
  },
  "dependencies": {
    "@emotion/babel-preset-css-prop": "^10.0.14",
    "@emotion/core": "^10.0.16",
    "@emotion/styled": "^10.0.15",
    "axios": "^0.19.0",
    "bulma": "^0.7.5",
    "debug": "^4.1.1",
    "eslint-plugin-react": "^7.14.3",
    "immer": "^4.0.0",
    "node-sass": "^4.12.0",
    "prop-types": "^15.7.2",
    "react": "^16.9.0",
    "react-dom": "^16.9.0",
    "react-redux": "^7.1.1",
    "redux": "^4.0.4",
    "redux-devtools-extension": "^2.13.8",
    "redux-thunk": "^2.3.0"
  }
}

0 个答案:

没有答案