React Native не может найти плагин «предложение-цифра c -сепаратор» - PullRequest
0 голосов
/ 04 мая 2020

Эта проблема просто возникла однажды, без каких-либо изменений в пакете. json file.

Выполнение команды yarn приводит к следующему:

$ yarn

[BABEL] 
Could not find plugin "proposal-numeric-separator". 
Ensure there is an entry in ./available-plugins.js for it. 

Я искал в Интернете и нашел решение для этой проблемы: Не удалось найти плагин "Предложение-числовой c -separator"

И выполнил все шаги:

  1. Снять блокировку пакета. json
  2. rm -rf node_modules
  3. Обновлен пакет. json
    "devDependencies": {
        "@babel/compat-data": "^7.8.0",
        "@babel/preset-env": "^7.8.0",
        "babel-loader": "^8.1.0",
        ...
    }

Я также попробовал различные комбинации следующих команд, чтобы убедиться, что не было проблем с кешем, которые могут загрязнять вещи.

$ npx npm-force-resolutions
$ npm cache clean --force     
$ rm -rf /Users/user/Library/Caches/Yarn  
$ yarn cache clean  

Вот копия моего пакета. json file

{
  "name": "hmiclient",
  "version": "0.9.97",
  "private": true,
  "scripts": {
    "start": "react-native start",
    "android.clean": "cd android && rm -rf build && ./gradlew clean && cd app && rm -rf build && cd .. && cd ..",
    "android.buildrelease.prod": "export ENVFILE=.env.prod && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && sh ./envconfig/upload-android-sourcemap.sh && cd android && ./gradlew bundleRelease",
    "android.buildrelease.stage": "export ENVFILE=.env.stage && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && ./gradlew android/assembleRelease",
    "android.buildrelease.prod.windows": "set ENVFILE=.env.prod && ./envconfig/setupenv.sh && react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res && cd android && ./gradlew bundleRelease",
    "android.debugrelease.prod": "export ENVFILE=.env.prod && chmod 755 ./envconfig/setupenv.sh && react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res  && cd android && ./gradlew assembleDebug",
    "android.run.prod": "export ENVFILE=.env.prod && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && react-native run-android",
    "android.run.stage": "export ENVFILE=.env.stage && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && react-native run-android",
    "android.run.local": "export ENVFILE=.env.local && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && react-native run-android --appIdSuffix 'debug'",
    "android.run.local.windows": "set ENVFILE=.env.local && ./envconfig/setupenv.sh && react-native run-android --appIdSuffix 'debug'",
    "ios.buildrelease.prod": "export ENVFILE=.env.prod && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh",
    "ios.buildrelease.archive": "export ENVFILE=.env.prod && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && xcodebuild archive -workspace ios/client.xcworkspace -scheme clientPROD -configuration Release -archivePath ios/build/clientPROD.xcarchive && xcodebuild -exportArchive -archivePath ios/build/clientPROD.xcarchive -exportOptionsPlist ios/exportOptions.plist -exportPath ~/Library⁩/Developer⁩/Xcode⁩/Archives⁩ && fastlane deploy XXX",
    "ios.run.prod": "export ENVFILE=.env.prod && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && react-native run-ios",
    "ios.run.stage": "export ENVFILE=.env.stage && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && react-native run-ios",
    "ios.run.local": "export ENVFILE=.env.local && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && react-native run-ios --simulator='iPhone 8 Plus'",
    "ios.run.local_device": "export ENVFILE=.env.local_device && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && react-native run-ios --device",
    "ios.run.local_other": "export ENVFILE=.env.local && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && react-native run-ios --simulator='iPhone X'",
    "test": "node node_modules/jest/bin/jest.js",
    "lint": "standard src/**/*.js src/**/*.jsx",
    "postinstall": "patch-package && jetifier",
    "remotedev": "remotedev --hostname=192.168.1.66 --port=8000",
    "e2e": "wdio wdio.conf.js"
  },
  "dependencies": {
    "@react-native-community/async-storage": "^1.6.2",
    "@react-native-community/google-signin": "^3.0.4",
    "@react-native-community/react-native-cookies": "^1.1.0",
    "base-64": "^0.1.0",
    "bugsnag-react-native": "^2.23.2",
    "crypto-js": "^3.1.9-1",
    "dotenv": "^8.2.0",
    "es6-promisify": "^6.0.2",
    "fast-deep-equal": "^2.0.1",
    "jetifier": "^1.6.4",
    "libphonenumber-js": "^1.7.26",
    "mustache": "^3.1.0",
    "parse": "https://github.com/parse-community/Parse-SDK-JS#27a5ca00f41160791f80b8ed70bf3ce5afad5c0b",
    "patch-package": "^6.2.0",
    "postinstall-postinstall": "^2.0.0",
    "qs": "^6.9.1",
    "react": "16.12.0",
    "react-native": "0.61.4",
    "react-native-app-intro-slider": "^3.0.0",
    "react-native-background-timer": "^2.1.1",
    "react-native-camera": "^3.9.0",
    "react-native-carrier-info": "^1.1.2",
    "react-native-config": "0.12.0",
    "react-native-contacts": "^5.0.6",
    "react-native-datepicker": "1.7.2",
    "react-native-device-info": "^5.2.1",
    "react-native-elements": "0.19.0",
    "react-native-fbsdk": "^1.1.1",
    "react-native-firebase": "~5.5.6",
    "react-native-fs": "^2.16.2",
    "react-native-gesture-handler": "1.5.0",
    "react-native-image-picker": "1.1.0",
    "react-native-linear-gradient": "^2.4.4",
    "react-native-material-ui": "^1.30.1",
    "react-native-modal": "^11.5.3",
    "react-native-phone-input": "0.2.4",
    "react-native-picker-select": "6.3.3",
    "react-native-qrcode-svg": "^5.3.2",
    "react-native-reanimated": "1.4.0",
    "react-native-restart": "^0.0.13",
    "react-native-safe-area-context": "^0.6.1",
    "react-native-shapes": "^0.1.0",
    "react-native-svg": "^9.13.3",
    "react-native-swiper": "^1.6.0-rc.3",
    "react-native-swiper-flatlist": "2.0.3",
    "react-native-vcards": "^2.5.0",
    "react-native-vector-icons": "^6.1.0",
    "react-native-webview": "^7.4.3",
    "react-navigation": "^4.0.10",
    "react-navigation-stack": "^1.10.3",
    "react-navigation-tabs": "^2.5.6",
    "react-redux": "7.1.3",
    "redux": "4.0.4",
    "redux-persist": "^6.0.0",
    "redux-persist-filesystem-storage": "2.1.0",
    "redux-persist-transform-filter": "0.0.20",
    "redux-thunk": "^2.3.0",
    "remote-redux-devtools": "^0.5.16",
    "reselect": "^4.0.0",
    "rn-fetch-blob": "^0.11.2"
  },
  "devDependencies": {
    "@babel/compat-data": "^7.8.0",
    "@babel/core": "^7.7.2",
    "@babel/plugin-proposal-numeric-separator": "^7.8.3",
    "@babel/preset-env": "^7.8.0",
    "@babel/runtime": "^7.7.2",
    "@types/jest": "^24.0.22",
    "@wdio/allure-reporter": "^5.16.0",
    "@wdio/appium-service": "^5.16.5",
    "@wdio/cli": "^5.16.4",
    "@wdio/jasmine-framework": "^5.16.5",
    "@wdio/local-runner": "^5.16.4",
    "@wdio/mocha-framework": "^5.16.0",
    "@wdio/spec-reporter": "^5.15.2",
    "@wdio/sync": "^5.16.0",
    "appium": "^1.15.1",
    "babel-jest": "^24.9.0",
    "babel-loader": "^8.1.0",
    "babel-plugin-transform-remove-console": "^6.9.4",
    "chromedriver": "^78.0.1",
    "detox": "^14.7.0",
    "gradle-to-js": "^2.0.0",
    "jest": "24.9.0",
    "metro-react-native-babel-preset": "0.57.0",
    "react-test-renderer": "^16.11.0",
    "remotedev-server": "^0.3.1",
    "standard": "^14.3.1",
    "wdio-chromedriver-service": "^5.0.2",
    "wdio-video-reporter": "^1.4.4"
  },
  "detox": {
    "configurations": {
      "ios.sim.debug": {
        "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/client.app",
        "build": "xcodebuild -workspace ios/client.xcworkspace -scheme client -configuration Debug -UseNewBuildSystem=YES -sdk iphonesimulator -derivedDataPath ios/build",
        "type": "ios.simulator",
        "name": "iPhone 8"
      },
      "ios.sim.release": {
        "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/client.app",
        "build": "set -o pipefail && export CODE_SIGNING_REQUIRED=NO && export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -project ios/example.xcodeproj  -UseNewBuildSystem=YES -scheme example_ci -configuration Release -sdk iphonesimulator -derivedDataPath ios/build",
        "type": "ios.simulator",
        "name": "iPhone 8"
      },
      "android.emu.debug": {
        "binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk",
        "build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..",
        "type": "android.emulator",
        "name": "Pixel_2_API_29"
      },
      "android.emu.release": {
        "binaryPath": "android/app/build/outputs/apk/release/app-release.apk",
        "build": "cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && cd ..",
        "type": "android.emulator",
        "name": "Pixel_2_API_29"
      }
    },
    "test-runner": "jest",
    "specs": "e2e"
  },
  "standard": {
    "globals": [
      "__DEV__",
      "detox",
      "describe",
      "it",
      "beforeEach",
      "afterEach",
      "element",
      "expect",
      "by",
      "device",
      "waitFor",
      "fetch"
    ]
  }
}

Любая помощь будет принята с благодарностью

Спасибо

...