> exercism download --exercise=hello-world --track=typescript
> cd .\exercism\typescript\hello-world\
> yarn install
> yarn test
I have this error:
Type Error: Cannot read properties of undefined (reading 'D:\Code\exercism\typescript\hello-world\.pnp.cjs')
at c4 (D:\Code\exercism\typescript\hello-world\.yarn\releases\yarn-3.6.0.cjs:390:12692)
at a0e (D:\Code\exercism\typescript\hello-world\.yarn\releases\yarn-3.6.0.cjs:390:13173)
at Object.mf (D:\Code\exercism\typescript\hello-world\.yarn\releases\yarn-3.6.0.cjs:390:13402)
at D:\Code\exercism\typescript\hello-world\.yarn\releases\yarn-3.6.0.cjs:694:4611
at Object.Ta (D:\Code\exercism\typescript\hello-world\.yarn\releases\yarn-3.6.0.cjs:390:10714)
at wl.findPackageLocation (D:\Code\exercism\typescript\hello-world\.yarn\releases\yarn-3.6.0.cjs:694:4566)
at D:\Code\exercism\typescript\hello-world\.yarn\releases\yarn-3.6.0.cjs:423:1264
at Function.from (<anonymous>)
at LB (D:\Code\exercism\typescript\hello-world\.yarn\releases\yarn-3.6.0.cjs:423:1008)
at d9 (D:\Code\exercism\typescript\hello-world\.yarn\releases\yarn-3.6.0.cjs:423:1589)
And yarn install log me this:
➤ YN0032: │ fsevents@npm:2.3.3: Implicit dependencies on node-gyp are discouraged
➤ YN0002: │ @exercism/typescript-hello-world@workspace:. doesn't provide @babel/core (p29b02), 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
My system: Windows 10 (19045), NodeJS 20.9.0.
P.S. (github is amazing, autoclose issues - the best option, really ())
thanks a lot for this great tool and the great learning experience it gives to me.
I just tried to get started with the TypeScript track and also ran into this issue with Node 20:
/typescript/hello-world $ nvm use 20
Now using node v20.9.0 (npm v10.1.0)
/typescript/hello-world $ yarn test
Type Error: Cannot read properties of undefined (reading '/typescript/hello-world/.pnp.cjs')
at ...
I can run the tests with Node 18, though. There were no error messages during yarn install with Node 20.
Hello,
sorry for disturbing you. I solved the problem, whose main cause was the presence of a .yarn directory in my home folder. Moreover I had some problems with corepack. Here are the steps I did to have the project running, after having deleted the .yarn directory in my home.
exercism download --track=typescript --exercise=hello-world
cd Exercism/typescript/hello-world/
yarn set version stable
yarn add -D corepack
yarn install
yarn test