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

Unable to build locally #30

Closed
tylerhoward15 opened this issue Oct 2, 2023 · 2 comments
Closed

Unable to build locally #30

tylerhoward15 opened this issue Oct 2, 2023 · 2 comments

Comments

@tylerhoward15
Copy link

Tried using npm and pnpm and neither would build. "pnpm install" works fine, but running "pnpm dev" throws the following error

- error Failed to load next.config.mjs, see more info here https://nextjs.org/docs/messages/next-config-error

Error: Cannot find package 'C:\Users\x\Desktop\nextjs-portfolio\nextjs-portfolio-x\node_modules\.pnpm\@[email protected]_@[email protected]_@[email protected]_yd2af6audhnahnbsveya6jkwiy\node_modules\@opentelemetry\exporter-trace-otlp-grpc\package.json' imported from C:\Users\x\Desktop\nextjs-portfolio\nextjs-portfolio-x\node_modules\.pnpm\@[email protected]_@[email protected]_@[email protected]_yd2af6audhnahnbsveya6jkwiy\node_modules\@effect-ts\otel-exporter-trace-otlp-grpc\_mjs\index.mjs

Did you mean to import @[email protected]_@[email protected]/node_modules/@opentelemetry/exporter-trace-otlp-grpc/build/src/index.js?  
   at legacyMainResolve (node:internal/modules/esm/resolve:188:26)
   at packageResolve (node:internal/modules/esm/resolve:767:14)
   at moduleResolve (node:internal/modules/esm/resolve:829:20)
   at defaultResolve (node:internal/modules/esm/resolve:1034:11)
   at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:375:12)
   at ModuleLoader.resolve (node:internal/modules/esm/loader:344:25)
   at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:220:38)
   at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
   at link (node:internal/modules/esm/module_job:84:36) {
 type: 'Error',
 code: 'ERR_MODULE_NOT_FOUND'
}
 ELIFECYCLE  Command failed with exit code 1.

Seems related to the previous issue mentioned here: #17. However, that fix doesn't seem to work.

If related, the root cause of this problem can be found here: contentlayerdev/contentlayer#506

Could not get any of the fixes mentioned in that thread to work. So either a fix or temporary workaround would be great, thanks!

@tylerhoward15
Copy link
Author

Completely removed the directory and restarted and somehow worked that time, maybe transient error

@SunWuyuan
Copy link

SunWuyuan commented Feb 21, 2024

补充,我发现使用nodejs16可以基本上正常运行,但这似乎不是临时问题

In addition, I found that using nodejs16 can basically run normally, but this does not seem to be a temporary issue(
Translation)

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