adrianhajdin / portfolio_website

Tutorial created by Enyel Sequeira, taught by JavaScript Mastery
https://www.jsmastery.pro
3.36k stars 694 forks source link

It was seem the doc can be cpmpiled. But there was no content by "Internal Server Error" on the broswer. #52

Open BogdaLD opened 2 months ago

BogdaLD commented 2 months ago

bash: /Users/liudong/.nvm/nvm.sh~/.ii: No such file or directory

The default interactive shell is now zsh. To update your account to use zsh, please run chsh -s /bin/zsh. For more details, please visit https://support.apple.com/kb/HT208050. 192:portfolio_website-STARTER liudong$ npm run dev

portfolio_nextjs@0.1.0 dev next dev

▲ Next.js 14.2.1

When i finished "npm i", updated the react version and run "npm run dev", It was seem the doc can be cpmpiled. But there was no content by "Internal Server Error" on the broswer.

FalconMCMXCIX commented 1 month ago

The error messages indicate that there are a few issues with your setup. Let's address them step by step:

Missing yarn Command:

bash

/bin/sh: yarn: command not found Ensure that Yarn is installed. You can install it globally using npm:

bash

npm install -g yarn Missing @babel/runtime Dependency:

vbnet

Error: Failed to resolve "@babel/runtime/regenerator" You need to install the @babel/runtime package. Run:

bash

npm install @babel/runtime Custom Babel Configuration Warning:

rust

Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc" Next.js suggests that you might not need a custom Babel configuration. However, if you need it, ensure your .babelrc is correctly configured. You can refer to Next.js documentation for more details.

Missing Build Manifest File:

perl

Error: ENOENT: no such file or directory, open '/Users/liudong/My Project/portfolio_website-STARTER/.next/fallback-build-manifest.json' This usually happens if there are issues during the build process. Ensure all necessary dependencies are installed and there are no errors during the build.

Clear Next.js Cache and Rebuild: Sometimes, clearing the .next folder and rebuilding can solve various issues. Run:

bash

rm -rf .next npm run dev Check for Correct Node.js Version: Ensure you're using a compatible Node.js version with your Next.js project. You can use nvm to manage and switch Node.js versions easily:

bash

nvm install --lts nvm use --lts Ensure All Dependencies are Installed: Ensure all project dependencies are correctly installed. Run:

bash

npm install Check next.config.js: Ensure your next.config.js is correctly configured. You can enable SWC for styled-components as follows:

javascript

// next.config.js module.exports = { compiler: { styledComponents: true, }, } Update Packages: Make sure all your packages are up to date. Sometimes, updating to the latest versions can resolve issues:

bash

npm update Check for Network Issues: Make sure there are no network issues causing the failure to fetch or load resources.

After performing these steps, try running your development server again:

bash npm run dev If the issue persists, please share the updated error messages, and we can continue troubleshooting from there.