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 install / yarn test does not work out of the box for typescript exercises #1403

Closed
elmq0022 opened this issue Oct 28, 2023 · 2 comments
Closed

Comments

@elmq0022
Copy link

node and yarn versions

two-fer$ node --version
v20.9.0
two-fer$ yarn --version
3.6.0

The instructions of yarn install and yarn test don't work out of the box. I imagine there is some mismatch on package versions.

This forum post seems to have a workable (albeit slightly annoying) work around, https://forum.exercism.org/t/issue-with-local-jest-type-definitions-yarn-3-and-jest/6867

Basically it's:

yarn install
npm i --save-dev @types/jest
yarn install
yarn test

Here's my install and the error for reference.

two-fer$ yarn install
➤ YN0000: ┌ Resolution step
➤ YN0032: │ fsevents@npm:2.3.3: Implicit dependencies on node-gyp are discouraged
➤ YN0061: │ @npmcli/move-file@npm:2.0.1 is deprecated: This functionality has been moved to @npmcli/fs
➤ YN0002: │ @exercism/typescript-two-fer@workspace:. doesn't provide @babel/core (p04199), requested by babel-jest
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 9s 534ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ yallist@npm:3.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yallist@npm:4.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs-parser@npm:21.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:17.7.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yocto-queue@npm:0.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 2s 399ms
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0007: │ core-js@npm:3.30.2 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js@npm:3.33.1 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 2s 766ms
➤ YN0000: Done with warnings in 14s 903ms

two-fer$ yarn test
Type Error: Cannot read properties of undefined (reading ~/two-fer/.pnp.cjs')
    at c4 (~/two-fer/.yarn/releases/yarn-3.6.0.cjs:390:12692)
    at a0e (~/two-fer/.yarn/releases/yarn-3.6.0.cjs:390:13173)
    at Object.mf (~/two-fer/.yarn/releases/yarn-3.6.0.cjs:390:13402)
    at ~/two-fer/.yarn/releases/yarn-3.6.0.cjs:694:4611
    at Object.Ta (~/two-fer/.yarn/releases/yarn-3.6.0.cjs:390:10714)
    at wl.findPackageLocation (~/two-fer/.yarn/releases/yarn-3.6.0.cjs:694:4566)
    at ~/two-fer/.yarn/releases/yarn-3.6.0.cjs:423:1264
    at Function.from (<anonymous>)
    at LB (~/two-fer/.yarn/releases/yarn-3.6.0.cjs:423:1008)
    at d9 (~/two-fer/.yarn/releases/yarn-3.6.0.cjs:423:1589)
@github-actions
Copy link
Contributor

Hello. Thanks for opening an issue on Exercism. We are currently in a phase of our journey where we have paused community contributions to allow us to take a breather and redesign our community model. You can learn more in this blog post. As such, all issues and PRs in this repository are being automatically closed.

That doesn't mean we're not interested in your ideas, or that if you're stuck on something we don't want to help. The best place to discuss things is with our community on the Exercism Community Forum. You can use this link to copy this into a new topic there.


Note: If this issue has been pre-approved, please link back to this issue on the forum thread and a maintainer or staff member will reopen it.

@adamfeldman
Copy link

See also this forum reply from a maintainer: http://forum.exercism.org/t/issue-with-local-jest-type-definitions-yarn-3-and-jest/6867/17

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