Issues in Setup

I have done all the steps of installation correctly and every thing worked correctly and also I had solved an issue. But then I tried to install cypress and then even after uninstalling it, ‘pnpm run develop’ isn’t working. The errors are cascading, I get new errors after resolving the previous ones. I’ve tried so many ways to solve it but errors aren’t ending. I’ve tried to uninstall pnpm, node_modules, typescript and reinstall them but still nothing worked. And I have also added “main”: “lib/typescript.js” to package.json but still the problem persisted.

devbhuva@DESKTOP-UHU4NV9:~/freeCodeCamp$ pnpm run develop

> @freecodecamp/freecodecamp@0.0.1 predevelop /home/devbhuva/freeCodeCamp
> npm-run-all create:*


> @freecodecamp/freecodecamp@0.0.1 create:config /home/devbhuva/freeCodeCamp
> tsc -p config && pnpm run ensure-env && pnpm run download-trending


> @freecodecamp/freecodecamp@0.0.1 ensure-env /home/devbhuva/freeCodeCamp
> cross-env DEBUG=fcc:* ts-node ./tools/scripts/build/ensure-env.ts

node:internal/modules/cjs/loader:444
      throw err;
      ^

Error: Cannot find module '/home/devbhuva/freeCodeCamp/tools/node_modules/typescript/lib/typescript.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:436:19)
    at Module._findPath (node:internal/modules/cjs/loader:678:18)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1061:27)
    at Function.resolve (node:internal/modules/cjs/helpers:116:19)
    at projectLocalResolveHelper (/home/devbhuva/freeCodeCamp/node_modules/.pnpm/ts-node@10.9.1_@types+node@18.15.10_typescript@4.9.5/node_modules/ts-node/dist/util.js:117:24)
    at resolveCompiler (/home/devbhuva/freeCodeCamp/node_modules/.pnpm/ts-node@10.9.1_@types+node@18.15.10_typescript@4.9.5/node_modules/ts-node/dist/configuration.js:232:22)
    at resolveAndLoadCompiler (/home/devbhuva/freeCodeCamp/node_modules/.pnpm/ts-node@10.9.1_@types+node@18.15.10_typescript@4.9.5/node_modules/ts-node/dist/configuration.js:225:26)
    at findAndReadConfig (/home/devbhuva/freeCodeCamp/node_modules/.pnpm/ts-node@10.9.1_@types+node@18.15.10_typescript@4.9.5/node_modules/ts-node/dist/configuration.js:48:28)
    at phase3 (/home/devbhuva/freeCodeCamp/node_modules/.pnpm/ts-node@10.9.1_@types+node@18.15.10_typescript@4.9.5/node_modules/ts-node/dist/bin.js:254:67)
    at bootstrap (/home/devbhuva/freeCodeCamp/node_modules/.pnpm/ts-node@10.9.1_@types+node@18.15.10_typescript@4.9.5/node_modules/ts-node/dist/bin.js:47:30) {
  code: 'MODULE_NOT_FOUND',
  path: '/home/devbhuva/freeCodeCamp/tools/node_modules/typescript/package.json',
  requestPath: 'typescript'
}

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.
 ELIFECYCLE  Command failed with exit code 1.
ERROR: "create:config" exited with 1.
 ELIFECYCLE  Command failed with exit code 1.

Hello there,

Two things of note:

  1. We do not support Windows to run the freeCodeCamp repository locally
  2. The error suggests something has gone wrong with the installation of the typescript package - personally, I would keep trying pnpm i, and watch out for errors during the installation

We offer alternatives in the docs, if you are trying to run freeCodeCamp on Windows.

Okay Thanks. I’ll try.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.