Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@parcel/config-webextension missing dependency @parcel/transformer-raw #6730

Closed
ksmithut opened this issue Aug 17, 2021 · 1 comment · Fixed by #7193
Closed

@parcel/config-webextension missing dependency @parcel/transformer-raw #6730

ksmithut opened this issue Aug 17, 2021 · 1 comment · Fixed by #7193

Comments

@ksmithut
Copy link

🐛 bug report

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

.parcelrc

{
  "extends": "@parcel/config-webextension"
}

command

parcel build src/manifest.json src/devtools/panel/panel.html --dist-dir dist

🤔 Expected Behavior

I would expect there to not be an error when running build

😯 Current Behavior

When trying to run a parcel build (2.0.0-rc.0) using the @parcel/config-webextension an error message pops up:

@parcel/core: Could not determine version of @parcel/transformer-raw in node_modules/@parcel/config-webextension/index.json. Either include it in "dependencies" or "parcelDependencies".

The dependencies in the package.json for @parcel/config-webextension:

  "dependencies": {
    "@parcel/config-default": "2.0.0-rc.0",
    "@parcel/packager-raw-url": "2.0.0-rc.0",
    "@parcel/transformer-webextension": "2.0.0-rc.0"
  },

which indeed does not include @parcel/transformer-raw

💁 Possible Solution

Add the dependency to @parcel/config-webextension

It also looks like this error only shows up when you use the "default_locale": "en", option in the manifest.json

🔦 Context

Keeping my dependencies on the bleeding edge. Little bit of blood, but not too much :) that's what release candidates are for!

💻 Code Sample

package.json

{
  "scripts": {
    "build": "parcel build manifest.json"
  },
  "dependencies": {
    "@parcel/config-webextension": "^2.0.0-rc.0",
    "parcel": "^2.0.0-rc.0"
  }
}

.parcelrc

{
  "extends": "@parcel/config-webextension"
}

manifest.json

{
  "manifest_version": 2,
  "name": "__MSG_extensionName__",
  "version": "0.0.0",
  "default_locale": "en",
  "description": "__MSG_extensionDescription__"
}

_locales/en/messages.json

{
  "extensionName": {
    "message": "test name",
    "description": "The name of the extension."
  },
  "extensionDescription": {
    "message": "test description",
    "description": "The description of the extension."
  }
}
yarn # or npm i
yarn build # or npm run build

🌍 Your Environment

Software Version(s)
Parcel 2.0.0-rc.0
Node v16.6.2
npm/Yarn [email protected]
Operating System macOS 11.5.1
@ksmithut
Copy link
Author

ksmithut commented Aug 17, 2021

This is maybe a different issue, but if I get it to successfully build by taking out the default_locale option, I get a warning in the console:

console: 
"extendDefaultPlugins" utility is deprecated.
Use "preset-default" plugin with overrides instead.
For example:
{
  name: 'preset-default',
  params: {
    overrides: {
      // customize plugin options
      convertShapeToPath: {
        convertArcs: true
      },
      // disable plugins
      convertPathData: false
    }
  }
}

Edit: Seems unrelated. I started using "targets" in my package.json and this warning went away.

arty-name added a commit to arty-name/parcel that referenced this issue Oct 26, 2021
@mischnic mischnic linked a pull request Oct 26, 2021 that will close this issue
3 tasks
lettertwo added a commit that referenced this issue Nov 15, 2021
* v2: (68 commits)
  Fix RangeError in `not export` error with other file type (#7295)
  Apply sourcemap in @parcel/transformer-typescript-tsc (#7287)
  Fix side effects glob matching (#7288)
  Fix changelog headings
  v2.0.1
  Changelog for v2.0.1
  Resolve GLSL relative to the importer, not the asset (#7263)
  fix: add @parcel/diagnostic as dependency of @parcel/transformer-typescript-types (#7248)
  Fixed missing "Parcel" export member in Module "@parcel/core" (#7250)
  Add script to sync engines with core version (#7207)
  Bump swc (#7216)
  Make Webpack loader detection regex dramatically faster (#7226)
  swc optimizer (#7212)
  Update esbuild in optimizer (#7233)
  Properly visit member expressions (#7228)
  Update to prettier 2 (#7209)
  Fix serve mode with target override and target source fields (#7187)
  Update package.json to include the repository (#7184)
  fix #6730: add transformer-raw as dependency of config-webextension (#7193)
  Log warning instead of crash if image optimizer fails (#7119)
  ...
lettertwo added a commit that referenced this issue Nov 15, 2021
* v2: (68 commits)
  Fix RangeError in `not export` error with other file type (#7295)
  Apply sourcemap in @parcel/transformer-typescript-tsc (#7287)
  Fix side effects glob matching (#7288)
  Fix changelog headings
  v2.0.1
  Changelog for v2.0.1
  Resolve GLSL relative to the importer, not the asset (#7263)
  fix: add @parcel/diagnostic as dependency of @parcel/transformer-typescript-types (#7248)
  Fixed missing "Parcel" export member in Module "@parcel/core" (#7250)
  Add script to sync engines with core version (#7207)
  Bump swc (#7216)
  Make Webpack loader detection regex dramatically faster (#7226)
  swc optimizer (#7212)
  Update esbuild in optimizer (#7233)
  Properly visit member expressions (#7228)
  Update to prettier 2 (#7209)
  Fix serve mode with target override and target source fields (#7187)
  Update package.json to include the repository (#7184)
  fix #6730: add transformer-raw as dependency of config-webextension (#7193)
  Log warning instead of crash if image optimizer fails (#7119)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants