Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
BogdaLD opened this issue Apr 16, 2024 · 1 comment

Comments

@BogdaLD
Copy link

BogdaLD commented Apr 16, 2024

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

[email protected] dev
next dev

▲ Next.js 14.2.1

✓ Starting...
/bin/sh: yarn: command not found
Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc" https://nextjs.org/docs/messages/swc-disabled
✓ Ready in 3.1s
Using external babel configuration from /Users/liudong/My Project/portfolio_website-STARTER/.babelrc
⚠ It looks like there is a custom Babel configuration that can be removed:
⚠ Next.js supports the following features natively:
⚠ - 'styled-components' can be enabled via 'compiler.styledComponents' in 'next.config.js'
⚠ For more details configuration options, please refer https://nextjs.org/docs/architecture/nextjs-compiler#supported-features
○ Compiling / ...
⨯ ./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/getErrorByType.js
Error: Failed to resolve "@babel/runtime/regenerator" relative to "/Users/liudong/My Project/portfolio_website-STARTER"
Import trace for requested module:
./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/getErrorByType.js
./node_modules/next/dist/client/components/react-dev-overlay/pages/client.js
./node_modules/next/dist/client/components/react-dev-overlay/pages/hot-reloader-client.js
./node_modules/next/dist/client/dev/hot-middleware-client.js
⨯ ./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/getErrorByType.js
Error: Failed to resolve "@babel/runtime/regenerator" relative to "/Users/liudong/My Project/portfolio_website-STARTER"
Import trace for requested module:
./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/getErrorByType.js
./node_modules/next/dist/client/components/react-dev-overlay/pages/client.js
./node_modules/next/dist/client/components/react-dev-overlay/pages/hot-reloader-client.js
./node_modules/next/dist/client/dev/hot-middleware-client.js
⨯ Error: ENOENT: no such file or directory, open '/Users/liudong/My Project/portfolio_website-STARTER/.next/fallback-build-manifest.json'
at readFileSync (node:fs:457:20)
at loadManifest (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/load-manifest.js:35:54)
at loadManifestWithRetries (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/load-components.js:40:51)
at async loadDefaultErrorComponentsImpl (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/load-default-error-components.js:30:24)
at async DevServer.getFallbackErrorComponents (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/dev/next-dev-server.js:594:16)
at async DevServer.renderErrorToResponseImpl (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/base-server.js:2198:40)
at async DevServer.renderToResponseImpl (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/base-server.js:2014:30)
at async DevServer.pipeImpl (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/base-server.js:915:25)
at async NextNodeServer.handleCatchallRenderRequest (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/next-server.js:272:17)
at async DevServer.handleRequestImpl (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/base-server.js:811:17)
at async /Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/dev/next-dev-server.js:339:20
at async Span.traceAsyncFn (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/trace/trace.js:154:20)
at async DevServer.handleRequest (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/dev/next-dev-server.js:336:24)
at async invokeRender (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/lib/router-server.js:174:21)
at async handleRequest (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/lib/router-server.js:353:24) {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/Users/liudong/My Project/portfolio_website-STARTER/.next/fallback-build-manifest.json'
}
Error: ENOENT: no such file or directory, open '/Users/liudong/My Project/portfolio_website-STARTER/.next/fallback-build-manifest.json'
at readFileSync (node:fs:457:20)
at loadManifest (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/load-manifest.js:35:54)
at loadManifestWithRetries (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/load-components.js:40:51)
at async loadDefaultErrorComponentsImpl (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/load-default-error-components.js:30:24)
at async DevServer.getFallbackErrorComponents (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/dev/next-dev-server.js:594:16)
at async DevServer.renderErrorToResponseImpl (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/base-server.js:2198:40)
at async DevServer.renderToResponseImpl (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/base-server.js:2014:30)
at async DevServer.pipeImpl (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/base-server.js:915:25)
at async NextNodeServer.handleCatchallRenderRequest (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/next-server.js:272:17)
at async DevServer.handleRequestImpl (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/base-server.js:811:17)
at async /Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/dev/next-dev-server.js:339:20
at async Span.traceAsyncFn (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/trace/trace.js:154:20)
at async DevServer.handleRequest (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/dev/next-dev-server.js:336:24)
at async invokeRender (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/lib/router-server.js:174:21)
at async handleRequest (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/lib/router-server.js:353:24) {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/Users/liudong/My Project/portfolio_website-STARTER/.next/fallback-build-manifest.json'
}
Error: ENOENT: no such file or directory, open '/Users/liudong/My Project/portfolio_website-STARTER/.next/fallback-build-manifest.json'
at readFileSync (node:fs:457:20)
at loadManifest (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/load-manifest.js:35:54)
at loadManifestWithRetries (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/load-components.js:40:51)
at async loadDefaultErrorComponentsImpl (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/load-default-error-components.js:30:24)
at async DevServer.getFallbackErrorComponents (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/dev/next-dev-server.js:594:16)
at async DevServer.renderErrorToResponseImpl (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/base-server.js:2198:40)
at async pipe.req.req (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/base-server.js:2051:30)
at async DevServer.pipeImpl (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/base-server.js:915:25)
at async /Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/dev/next-dev-server.js:339:20
at async Span.traceAsyncFn (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/trace/trace.js:154:20)
at async DevServer.handleRequest (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/dev/next-dev-server.js:336:24)
at async invokeRender (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/lib/router-server.js:174:21)
at async requestHandlerImpl (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/lib/router-server.js:389:24)
at async Server.requestListener (/Users/liudong/My Project/portfolio_website-STARTER/node_modules/next/dist/server/lib/start-server.js:141:13) {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/Users/liudong/My Project/portfolio_website-STARTER/.next/fallback-build-manifest.json'
}
GET / 500 in 4910ms
GET / 500 in 209ms

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants