I am running a github project – https://github.com/zjy365/next-template/tree/main on Mac, node.js 20.11, this template project is based on nextjs 14.
compiling and running this gives me some errors
Caused by:
- replacing imports failed
- Invariant: Expected relative import to start with "./next/", found "./[email protected]@next/dist/esm/server/web/globals"
Debug info:
- Execution of get_written_endpoint_with_issues failed
- Execution of <MiddlewareEndpoint as Endpoint>::write_to_disk failed
- Execution of Project::emit_all_output_assets failed
- Execution of VersionedContentMap::insert_output_assets failed
- Execution of all_assets_from_entries failed
- Execution of MiddlewareEndpoint::output_assets failed
- Execution of MiddlewareEndpoint::edge_files failed
- content is not available as task execution failed
- Execution of wrap_edge_entry failed
- Execution of get_middleware_module failed
- replacing imports failed
- Invariant: Expected relative import to start with "./next/", found "./[email protected]@next/dist/esm/server/web/globals"
at withErrorCause (/usr/local/lib/node_modules/next/dist/build/swc/index.js:409:19)
at async EndpointImpl.writeToDisk (/usr/local/lib/node_modules/next/dist/build/swc/index.js:590:20)
at async processMiddleware (/usr/local/lib/node_modules/next/dist/server/lib/router-utils/setup-dev-bundler.js:796:87)
at async handleEntries (/usr/local/lib/node_modules/next/dist/server/lib/router-utils/setup-dev-bundler.js:805:25) {
[cause]: [Error: content is not available as task execution failed
I have no idea what goes wrong.