Development Environment

I am wondering if anyone else is having issues running their freeCodeCamp local development environment. Everything was running properly until later in the day yesterday and I am wondering if it is a bug that has been introduced from a recent change or if it is something I have done. I have run git fetch upstream, git reset --hard upstream/main, and git push origin main --force. So I should have the latest updates. I am getting the following error when running pnpm run develop on my machine:

ERROR #98124  WEBPACK

Generating development JavaScript bundle failed

Can't resolve 'pinyin-tone/v2' in '/home/btripp365/projects/freeCodeCamp/client/src/templates/Challenges/components'

If you're trying to use a package make sure that 'pinyin-tone/v2' is installed. If you're trying to use a local file
make sure that the path is correct.

File: src/templates/Challenges/components/pinyin-to-hanzi-input.tsx:7:0

failed Building development bundle - 29.292s
ERROR in ./src/templates/Challenges/components/pinyin-to-hanzi-input.tsx 7:0-55
Module not found: Error: Can't resolve 'pinyin-tone/v2' in
'/home/btripp365/projects/freeCodeCamp/client/src/templates/Challenges/components'
 @ ./src/templates/Challenges/components/fill-in-the-blanks.tsx 11:0-57 40:44-62
 @ ./src/templates/Challenges/fill-in-the-blank/show.tsx 25:0-63 229:38-53
 @ ./.cache/_this_is_virtual_fs_path_/$virtual/async-requires.js 31:75-237
 @ ./.cache/app.js 14:0-52 28:87-32:1 31:29-42 34:29-42 28:0-32:2

webpack compiled with 1 error
success Writing page-data.json files to public directory - 1.336s - 1/6997 5237.72/s
success Caching HTML renderer compilation - 26.061s

I also tried running it on Codespaces. I do not seem to get the same error in the terminal, but when I tried to open the site it failed. Also Codespaces seems to be showing that there are some errors as shown here by the red colored file names:

Note: these same files are also red in VS Code on my machine. Also, pinyin-to-hanzi-input.test.tsx is shown here as having an error. Which seems related to the error shown above.

If someone could let me know whether or not their development environment is working with the latest version from the upstream repository, that would be very helpful. Thank you in advance.

Have you run pnpm install?

pnpm is already installed:

Also I noticed that pinyin-to-hanzi-input.test.tsx and pinyin-to-hanzi-input.tsx were both updated yesterday around the same time that my development environment stopped working. Here is a link to the pull request feat(client): add pinyin-to-hanzi input to fill in the blank challenge by huyenltnguyen · Pull Request #63986 · freeCodeCamp/freeCodeCamp · GitHub. This leads me to think that it could be an issue with a change that was made there. I could be totally wrong of course because I am very new to this and have only recently started contributing to FCC and also am fairly new to using git and Github.

No, you need to run pnpm install to install the packages our project uses.

1 Like

My apologies! I shouldn’t have assumed I knew what pnpm install would do.

I ran pnpm installand now everything is working again. Thank you for your help!