-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
.parcelrc fails to extend @parcel/config-default - cannot find module #5603
Comments
You should install @parcel/config-default and @parcel/transformer-typescript-tsc as dependencies |
Apologies, I actually had done that. I removed them as part of a test and forgot to re-add them when opening this ticket. I can confirm that everything still fails with the following package.json: {
"name": "boomerang-website",
"version": "1.0.0",
"scripts": {
"prestart": "npm run clean",
"start": "npx parcel ./src/*.html",
"clean": "npx rimraf ./dist",
"prebuild": "npm run clean",
"build": "npx parcel build ./src/*.html",
"predeploy": "npm run build",
"deploy": "sls deploy -v"
},
"devDependencies": {
"@parcel/config-default": "^2.0.0-alpha.3",
"@parcel/transformer-typescript-tsc": "^2.0.0-alpha.3",
"parcel": "^2.0.0-beta.1",
"rimraf": "^3.0.2"
},
"dependencies": {
"serverless-cloudfront-invalidate": "^1.5.0",
"serverless-s3-sync": "^1.15.0"
}
} npm start
|
You can try using the nightly version ( |
I created a new repo for testing. Installing as you suggest above gives me parcel@1.12.4 along with lots of npm warnings:
It does get rid of the error but it doesn't look like parcel is picking up my .parcelrc
If I install parcel@nightly I get a different error.
This suggests to me that the problem may be intermittent as it's not occurring in parcel 2 in the new repo. As I can't reproduce it in the new repo, should I open a new ticket for the |
Please share a complete runnable example where this error occurs. You don't need to create a new issue
Sorry, I forgot one |
I'm not sure if this is the same issue but I have been trying to move my JS application over to TypeScript and take advantage of type-checking. According to Parcel v2 documentation (https://v2.parceljs.org/languages/typescript/#type-checking) in order to get application-wide (multiple modules) type-checking via parcel I need a
and
I was building without either of these before. So I created those files. The first problem I encountered was as @alindsay55661 mentioned,
So I tried manually importing.
It looks like there is a typo in But aside from that, should it be necessary to explicitly import |
ok I tried changing
This is a rabbit hole I don't want to go down right now. |
Make sure that
Yes, for example Yarn PnP would throw an error if you don't list it in the dependencies. But I'm not quite sure how to put that into the docs without adding a note to every blue "example" block with a .parcelrc (or maybe that's fine?) |
I still think all of these problems are related to having incompatible versions of some Parcel packages. |
@alindsay55661 I workaround with below. $ cat .npmrc
public-hoist-pattern[]=@parcel/* My situation is pnpm being strict checking dependencies. |
Although might be another situation to mine: default packaging not match. Manual install specified without channel, seems not match. $ cd `mktemp -d`
$ mkdir a b c d e
$ env -C a yarn add @parcel/config-default
$ env -C b yarn add parcel
$ env -C c yarn add parcel @parcel/config-default
$ jq -r .version < a/node_modules/@parcel/config-default/package.json
2.0.0-alpha.3
$ jq -r .version < b/node_modules/parcel/package.json
2.0.0-beta.2
$ jq -r .version < c/node_modules/@parcel/config-default/package.json
2.0.0-alpha.3
$ jq -r .version < c/node_modules/parcel/package.json
2.0.0-beta.2 Manual install specified with channel, seems match. $ env -C d yarn add parcel@next @parcel/config-default@next
$ jq -r .version < d/node_modules/@parcel/config-default/package.json
2.0.0-beta.2
$ jq -r .version < d/node_modules/parcel/package.json
2.0.0-beta.2 If your pm is not strict, let parcel auto install, seems match. $ env -C e yarn add parcel@next
$ jq -r .version < e/node_modules/@parcel/config-default/package.json
2.0.0-beta.2
$ jq -r .version < e/node_modules/parcel/package.json
2.0.0-beta.2 |
Is there a solution? Hitting this in 2023 |
hit also on 2024 |
|
I tried configuring the parcel config file to disable default babel transpilation:- created the .parcelrc file at the project root {
"extends": "@parcel/config-default",
"transformers": {
"*.{js,mjs,jsx,cjs,ts,tsx}": [
"@parcel/transformer-js",
"@parcel/transformer-react-refresh-wrap"
]
}
} any fixes? |
🐛 bug report
I'm getting started with parcel in a brand new project with only a few files. I want to use tsc as the default Typescript compiler so I'm following instructions posted here: https://v2.parceljs.org/languages/typescript/#typescript's-tsc
Once I added the .pacelrc parcel no longer complies. It now fails with the following error:
🎛 Configuration (.babelrc, package.json, cli command)
.parcelrc
.package.json
🤔 Expected Behavior
Should resolve @parcel/config-default, the package exists.
😯 Current Behavior
💁 Possible Solution
🔦 Context
💻 Code Sample
🌍 Your Environment
The text was updated successfully, but these errors were encountered: