Error during yarn install "Invalid value type 66:0 in /opt/build/repo/yarn.lock

I am a new software developer and I am trying to deploy a portfolio app and keep receiving the bottom errors. I have read forums, watched youtube videos, and views support pages. Everything I am trying is not working and I believe that is due to my lack of understanding what the problem is exactly. Any help is appreciated.

derekwynnvannorman.netlify.app

8:26:57 AM: build-image version: fcb0c1b3ada6d25c1cb58e8bc514f5f23cc14f15 (focal)

8:26:57 AM: buildbot version: 5d9cbb75e9a22173e43831f5d661d8faaf2933ce

8:26:57 AM: Fetching cached dependencies

8:26:57 AM: Failed to fetch cache, continuing with build

8:26:57 AM: Starting to prepare the repo for build

8:26:57 AM: No cached dependencies found. Cloning fresh repo

8:26:57 AM: git clone --filter=blob:none https://github.com/WynnVN/Final_portfolio

8:26:58 AM: Preparing Git Reference refs/heads/Derek_branch

8:27:04 AM: Starting to install dependencies

8:27:07 AM: Python version set to 3.8

8:27:08 AM: Attempting Ruby version 2.7.2, read from environment

8:27:08 AM: Using Ruby version 2.7.2

8:27:09 AM: Started restoring cached go cache

8:27:09 AM: Finished restoring cached go cache

8:27:10 AM: go version go1.19.13 linux/amd64

8:27:11 AM: Using PHP version 8.0

8:27:13 AM: Downloading and installing node v18.19.1…

8:27:13 AM: Downloading https://nodejs.org/dist/v18.19.1/node-v18.19.1-linux-x64.tar.xz

8:27:13 AM: Computing checksum with sha256sum

8:27:13 AM: Checksums matched!

8:27:15 AM: Now using node v18.19.1 (npm v10.2.4)

8:27:15 AM: Enabling Node.js Corepack

8:27:15 AM: Started restoring cached build plugins

8:27:15 AM: Finished restoring cached build plugins

8:27:15 AM: Started restoring cached corepack dependencies

8:27:15 AM: Finished restoring cached corepack dependencies

8:27:15 AM: Started restoring cached yarn cache

8:27:16 AM: Finished restoring cached yarn cache

8:27:16 AM: No yarn workspaces detected

8:27:16 AM: Started restoring cached node modules

8:27:17 AM: Failed during stage “Install dependencies”: dependency_installation script returned non-zero exit code: 1

8:27:17 AM: Finished restoring cached node modules

8:27:17 AM: Installing npm packages using Yarn version 1.22.19

8:27:17 AM: yarn install v1.22.19

8:27:17 AM: error An unexpected error occurred: “Invalid value type 66:0 in /opt/build/repo/yarn.lock”.

8:27:17 AM: info If you think this is a bug, please open a bug report with the information provided in “/opt/build/repo/yarn-error.log”.

8:27:17 AM: info Visit yarn install | Yarn for documentation about this command.

8:27:17 AM: Error during Yarn install

8:27:17 AM: Failing build: Failed to install dependencies

I think I may have fixed the issue. I had to delete the yarn.lock file and run command npm install yarn and it seems to have fixed the above errors.

That’s awesome thanks for writing back in and sharing your solution.