parcel-bundler / parcel

The zero configuration build tool for the web. 📦🚀
https://parceljs.org
MIT License
43.43k stars 2.26k forks source link

Improve error message, when having nightly and standard packages in package.json at the same time #7946

Open avalanche1 opened 2 years ago

avalanche1 commented 2 years ago

🐛 bug report

parcel build doesn't work

🎛 Configuration (.babelrc, package.json, cli command)

package.json:

"@parcel/config-webextension": "^2.4.2-nightly.2666",
"@parcel/reporter-bundle-analyzer": "^2.4.1",
"@parcel/transformer-typescript-tsc": "^2.4.1",
"parcel": "^2.4.1"
{
  "extends": "@parcel/config-webextension",
}

🤔 Expected Behavior

builds ok

😯 Current Behavior

errors out:

> build:dev
> NODE_ENV=development parcel build src/entry/manifest.json --log-level verbose && date +"%T"

[ThrowableDiagnostic [Error]: The plugin "@parcel/reporter-dev-server" is not compatible with the current version of Parcel. Requires "2.0.0-nightly.1041+39b330e74" but the current version is "2.4.1".] {
  diagnostics: [
    {
      message: 'The plugin "@parcel/reporter-dev-server" is not compatible with the current version of Parcel. Requires "2.0.0-nightly.1041+39b330e74" but the current version is "2.4.1".',
      origin: '@parcel/core',
      codeFrames: [Array]
    }
  ]
}

💁 Possible Solution

fix the deps in @parcel\core

🌍 Your Environment

Software Version(s)
Parcel 2.4.1
Node 17.3.0
npm/Yarn npm 8.3.0
Operating System macOS 12.3
devongovett commented 2 years ago

You need to change all of the parcel dependencies to nightly, not just the web extension config.

mischnic commented 2 years ago

Maybe we should improve the error message: if one of the two packages is a nightly and the other isn't, suggest that everything or nothing should be installed in the nightly version.

avalanche1 commented 2 years ago

@devongovett there are no nightly versions for 2.4.2 neither for parcel itself, nor for @parcel/transformer-typescript-tsc

mischnic commented 2 years ago

The nightly versions always use 2.0.0-nightly.{counter}. For example look at the versions tab at https://www.npmjs.com/package/parcel