haul icon indicating copy to clipboard operation
haul copied to clipboard

haul-bundler won't install with pnpm strictPeerDependencies turned on

Open tachtevrenidis opened this issue 4 years ago • 3 comments

Environment

node: 10.15.3 pnpm: 2.25.6 react-native: 0.60.5 @haul-bundler/cli: 0.12.0

Description

While the old haul package used to install just fine with the same pnpm settings, while upgrading to the @haul-bundler/cli package (tried 0.10.0, 0.11.0 and 0.12.0), I get this error while installing...

I don't understand where the 0.11.0 dependency comes from since all the versions I am trying to install are 0.12.0.

 ERROR  @haul-bundler/cli > @haul-bundler/core: @haul-bundler/[email protected] requires a peer of @haul-bundler/core@^0.11.0 but version 0.12.0 was installed.

Reproducible Demo

package.json

{
  "name": "packageName",
  "version": "16.32.17",
  "private": false,
  "main": "lib-esm/index.js",
  "module": "lib-esm/index.js",
  "typings": "lib-esm/index.d.ts",
  "scripts": {
    "start": "haul start --dev true --minify false",
    "haul": "node ./node_modules/@haul-bundler/cli/bin/haul.js"
  },
  "dependencies": {
    "react-native-floating-action": "^1.13.0",
    "react-native-fs": "2.14.1",
    "react-native-modal": "6.5.0",
    "react-native-shimmer": "0.5.0",
    "base-64": "^0.1.0",
    "tslib": "^1.9.3",
    "jsc-android": "236355.1.1",
    "@react-native-community/netinfo": "4.1.5",
    "@react-native-community/cli-platform-android": "2.9.0"
  },
  "peerDependencies": {
    "react": ">=16.8.6",
    "react-native": "^0.60.5"
  },
  "devDependencies": {
    "webpack": "^4.30.0",
    "@types/react": "16.8.11",
    "@types/react-native": "0.57.18",
    "@types/webpack-env": "1.13.6",
    "@types/base-64": "^0.1.2",
    "@types/react-native-sqlite-storage": "^3.3.1",
    "@types/chai": "3.4.34",
    "@types/jest": "^24.0.14",
    "@babel/preset-typescript": "^7.3.3",
    "@babel/plugin-proposal-class-properties": "^7.5.5",
    "@babel/plugin-proposal-object-rest-spread": "^7.5.5",
    "@babel/plugin-transform-flow-strip-types": "^7.4.4",
    "@babel/plugin-transform-react-jsx": "^7.3.0",
    "@babel/polyfill": "^7.4.4",
    "@babel/preset-env": "^7.5.5",
    "@babel/register": "^7.5.5",
    "@babel/runtime": "^7.5.5",
    "@babel/cli": "^7.5.5",
    "babel-loader": "^8.0.2",
    "babel-preset-env": "^1.7.0",
    "metro": "^0.53.1",
    "metro-react-native-babel-preset": "^0.55.0",
    "circular-dependency-plugin": "^5.0.2",
    "es6-promise": "^4.2.4",
    "@haul-bundler/cli": "^0.12.0",
    "@haul-bundler/core": "^0.12.0",
    "@haul-bundler/preset-0.60": "^0.12.0",
    "@haul-bundler/babel-preset-react-native": "^0.12.0",
    "react-hot-loader": "^4.3.6",
    "ignore-loader": "^0.1.2",
    "json-loader": "^0.5.7",
    "loader-utils": "^1.1.0",
    "mocha": "4.1.0",
    "mocha-junit-reporter": "1.17.0",
    "raw-loader": "^0.5.1",
    "react": "^16.8.6",
    "react-native": "^0.60.5",
    "react-test-renderer": "^16.8.6",
    "react-transform-hmr": "^1.0.4",
    "reactotron-react-native": "~2.0.0",
    "reactotron-redux": "~2.0.0",
    "scheduler": "^0.14.0",
    "source-map-loader": "^0.2.3",
    "ts-loader": "^4.4.2",
    "copyfiles": "^2.0.0",
    "rimraf": "~2.6.2",
    "typescript": "3.3.3333",
    "lodash": "~4.17.12",
    "schedule": "^0.4.0",
    "ansi-parser": "^3.2.8",
    "genversion": "^2.1.1",
    "chai": "^3.5.0",
    "karma-chai-plugins": "^0.7.0",
    "sinon": "1.17.1",
    "enzyme": "^3.1.0",
    "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
    "terser": "^3.17.0",
    "webpack-bundle-analyzer": "^3.0.3"
  }
}

tachtevrenidis avatar Aug 20 '19 15:08 tachtevrenidis

@zamotany, do you know why the package.json of core-legacy in the repo shows a peer dep to core 0.12.0 but then when I install the npm package the peer dep to core is for version 0.11.0? (I think this is what is causing my issue above).

Screen Shot 2019-08-20 at 9 09 58 AM

tachtevrenidis avatar Aug 20 '19 16:08 tachtevrenidis

bump!

tachtevrenidis avatar Aug 23 '19 15:08 tachtevrenidis

@tachtevrenidis When I publish the packages with lerna it bumps the versions, but it does not update peerDependencies so I have to update them manually and sometimes, the packages are published without this manual bump to peerDependencies.

I'm looking into properly handling that.

zamotany avatar Sep 17 '19 12:09 zamotany