Node.js Bitbucket CI/CD管道中的npm安装错误

Node.js Bitbucket CI/CD管道中的npm安装错误,node.js,npm,package.json,bitbucket-pipelines,Node.js,Npm,Package.json,Bitbucket Pipelines,我为我的Bitbucket存储库设置了一个管道,如果没有节点缓存,它将运行npm install。到目前为止,它工作正常,但最近清除了节点缓存,现在我从Bitbucket(Pastebin链接,由于字符限制)获得以下输出: package.json: { "name": "my-app", "version": "0.1.0", "private": true, "dep

我为我的Bitbucket存储库设置了一个管道,如果没有
节点
缓存,它将运行
npm install
。到目前为止,它工作正常,但最近清除了
节点
缓存,现在我从Bitbucket(Pastebin链接,由于字符限制)获得以下输出:

package.json

{
  "name": "my-app",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.3.2",
    "@testing-library/user-event": "^7.1.2",
    "@types/geojson": "^7946.0.7",
    "@types/google-libphonenumber": "^7.4.19",
    "@types/google-map-react": "^2.1.0",
    "@types/jest": "^24.0.0",
    "@types/node": "^12.12.55",
    "@types/react": "^16.9.49",
    "@types/react-bootstrap": "^0.32.22",
    "@types/react-dom": "^16.9.8",
    "@types/react-modal": "^3.10.6",
    "@types/react-router-dom": "^5.1.5",
    "@types/supercluster": "^5.0.2",
    "axios": "^0.21.1",
    "bootstrap": "^4.5.2",
    "enzyme": "^3.11.0",
    "eslint": "^6.8.0",
    "firebase": "^7.24.0",
    "geojson": "^0.5.0",
    "google-libphonenumber": "^3.2.14",
    "google-map-react": "^2.1.3",
    "node-sass": "^4.0.0",
    "react": "^16.13.1",
    "react-async": "^10.0.1",
    "react-bootstrap": "^1.3.0",
    "react-cool-img": "^1.2.4",
    "react-dom": "^16.13.1",
    "react-dropzone": "^11.3.2",
    "react-modal": "^3.12.1",
    "react-router-dom": "^5.2.0",
    "react-scripts": "^3.4.4",
    "supercluster": "^7.1.0",
    "typescript": "^3.2.1",
    "use-supercluster": "^0.2.9"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "lint": "npx prettier --write src && npx eslint src --fix --ext .ts --ext .tsx"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "@types/enzyme": "^3.10.8",
    "@types/enzyme-adapter-react-16": "^1.0.6",
    "@typescript-eslint/eslint-plugin": "^3.10.1",
    "@typescript-eslint/parser": "^3.10.1",
    "enzyme": "^3.11.0",
    "enzyme-adapter-react-16": "^1.15.6",
    "eslint": "^7.23.0",
    "eslint-config-airbnb": "^18.2.0",
    "eslint-config-prettier": "^6.11.0",
    "eslint-plugin-import": "^2.22.0",
    "eslint-plugin-jsx-a11y": "^6.3.1",
    "eslint-plugin-promise": "^4.3.1",
    "eslint-plugin-react": "^7.20.6",
    "eslint-plugin-react-hooks": "^4.1.0",
    "eslint-plugin-sort-keys-fix": "^1.1.1",
    "prettier": "^2.1.1"
  }
}
比特桶管道.yml

image: node

definitions:
  steps:
    - step: &lint
        name: Check code style
        script:
          - npm install # this is where the error occurs
          - npx eslint **/*.ts[x]
        caches:
          - node
    - step: &build
        name: Build and test
        script:
          - echo > ".env"
          - echo REACT_APP_GOOGLE_API_KEY=$GOOGLE_API_KEY >> ".env"
          - echo REACT_APP_HANDSHAKE_API_KEY=$HANDSHAKE_API_KEY >> ".env"
          - npm install
          - npm run test
          - npm run build
        artifacts:
          - build/**
        caches:
          - node
    - step: &deploy
        name: Deploy to Firebase
        script:
          - cd functions
          - npm install
          - cd ..
          - pipe: atlassian/firebase-deploy:1.0.0
            variables:
              FIREBASE_TOKEN: $FIREBASE_TOKEN
              PROJECT_ID: $FIREBASE_PROJECT

pipelines:
  pull-requests:
    "**":
      - step: *lint
      - step: *build

  branches:
    master:
      - step: *lint
      - step: *build
      - step: *deploy

我担心它可能与
节点sass
包有关,因为我以前遇到过问题,这是错误中出现的第一个依赖项。但是我真的不知道如何解释这个输出或者如何修复它。谢谢你的帮助

看来我的直觉是对的,这是因为
节点sass
包。很明显,这是一个错误。安装
sass
解决了这个问题