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

Yarn and npx makes dumberjs #33

Open
simonfox opened this issue Jul 25, 2023 · 10 comments
Open

Yarn and npx makes dumberjs #33

simonfox opened this issue Jul 25, 2023 · 10 comments

Comments

@simonfox
Copy link

Sorry, not sure this is the right repo for this question...

New dumberjs project with makes is currently not working...
image

I'm assuming this is expected to work with Yarn2 as the .yarnrc.yml file includes Yarn2 configuration keys.

Try yarn start
image

Try npm start
image

@simonfox
Copy link
Author

image

image

@3cp
Copy link
Member

3cp commented Jul 25, 2023

Thx for the reporting!

Never tested dumber with yarn pnp.
Also aurelia 1 and aurelia 2 do not work with yarn pnp either.

You can try add a config to turn pnp off. https://github.com/aurelia/new/blob/master/common/.yarnrc.yml

I will add that file to dumber's skeleton.

@3cp
Copy link
Member

3cp commented Jul 25, 2023

I added that line in. Please try again.

@3cp
Copy link
Member

3cp commented Jul 25, 2023

It seems yarn also didn't support npm's override config.

https://github.com/dumberjs/new/blob/master/common/package.json#L132C3-L132C14

It still tris to install the normal chokidar v2.

@3cp
Copy link
Member

3cp commented Jul 25, 2023

I used yarn and pnpm both long ago, and also contributed to them. But in the end, I came back to npm, because all the saving they provided did not justify the time I wasted to understand their difference with npm.

I only want to focus on my code, not the tool.

@simonfox
Copy link
Author

@3cp thanks for looking into this...we've been using yarn1 for a long time and thought we would move back to npm as I thought I'd heard it was supposed to be much better than the early days...but we are running into an issue that seems to be covered by these...
npm/cli#4028
npm/cli#3208

mkdir node_modules && npm ci as suggested does help, but just wow 🤯

I'm currently looking at pnpm, but sounds like I might be wasting my time?

Out of interest, are you on the latest npm? Those issues arose from v7 and are still in current stable...

@simonfox
Copy link
Author

override config is resolutions yarn?

@3cp
Copy link
Member

3cp commented Jul 26, 2023

Probably because I never push up lock file so never used "npm ci" in my ci :-)
The yarn "resolutions" does looks similar, it might be different. The example shows exact version number, I don't know whether it supports "^3.0.0" like npm overrides.

Another thing is npm install will install the version of your overrides, not the ones implicitly requires by some dependencies. I doubt "resolutions" does the same, I guess it only affects resolution, not the yarn install.

For pnpm, compatibility wise, I had better experience with it than yarn. It's fast, but the main selling point for me was the disk saving.

@simonfox
Copy link
Author

I don't think you use typescript do you?

I have some strange ts build issues under pnpm where certain packages generate errors like error TS2742: The inferred type of 'default' cannot be named without a reference to '.pnpm/[email protected]/node_modules/reselect'.

I can resolve with paths config in tsconfig, but it's still a little unnerving.

@3cp
Copy link
Member

3cp commented Jul 27, 2023

I use ts with npm. Didn't recall anything like that with pnpm before.

That's exactly the kind of trouble I hate spending time on :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants