Documentation
Troubleshooting

Troubleshooting

Merge conflicts in package-lock.json in Pull Request

If you get merge conflicts in package-lock.json in a Pull Request, you can fix it by running:

git checkout main
git pull origin main
git checkout <branch with conflicts
git merge main
git checkout --theirs package-lock.json
git add .
git commit -m "fix: merge conflicts in package-lock.json"
npm install
# Commit package-lock.json and push
# Check that build is ok

Vercel looks for missing linux build for some packages

For some reason Vercel does not install linux packages for turbo, esbuild and @napi-rs/simple-git. Solution is to add them to the package-lock.json file, but there are som black magic here...

A solution is to install os specific packages and commit the package-lock.json file. This is not a good solution, but it works.

npm install -D --arch=arm64 --platform=darwin esbuild @napi-rs/simple-git
npm install -D --arch=arm64 --platform=linux esbuild @napi-rs/simple-git

Invalid hook call error in React caused by transpilation

Solution suggested here: https://github.com/martpie/next-transpile-modules#i-have-trouble-with-duplicated-dependencies-or-the-invalid-hook-call-error-in-react (opens in a new tab)

No inputs were found in config file in TypeScript

Fix is to add at least on .ts file (opens in a new tab)

VS Code complains that env variables not in turbo.json

Ths can be solved by restaring the eslint server.