chronark / chronark.com

https://chronark.com
MIT License
682 stars 382 forks source link

Unable to build locally #30

Closed tylerhoward15 closed 1 year ago

tylerhoward15 commented 1 year ago

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\@effect-ts+otel-exporter-trace-otlp-grpc@0.14.1_@effect-ts+core@0.60.5_@opentelemetry+api@1.4_yd2af6audhnahnbsveya6jkwiy\node_modules\@opentelemetry\exporter-trace-otlp-grpc\package.json' imported from C:\Users\x\Desktop\nextjs-portfolio\nextjs-portfolio-x\node_modules\.pnpm\@effect-ts+otel-exporter-trace-otlp-grpc@0.14.1_@effect-ts+core@0.60.5_@opentelemetry+api@1.4_yd2af6audhnahnbsveya6jkwiy\node_modules\@effect-ts\otel-exporter-trace-otlp-grpc\_mjs\index.mjs

Did you mean to import @opentelemetry+exporter-trace-otlp-grpc@0.39.1_@opentelemetry+api@1.4.1/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 commented 1 year ago

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

SunWuyuan commented 8 months ago

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

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