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

Can't run application on fresh install #314

Closed
vincent-boulin opened this issue Jul 6, 2023 · 2 comments
Closed

Can't run application on fresh install #314

vincent-boulin opened this issue Jul 6, 2023 · 2 comments

Comments

@vincent-boulin
Copy link

Hello,

It seems there is an issue running the project.

npm install don't have any issue, but using npm run dev or npm build the app crashed with this message :

> next dev

- ready started server on 0.0.0.0:3000, url: http://localhost:3000
- error Failed to load next.config.mjs, see more info here https://nextjs.org/docs/messages/next-config-error
file:///home/vince/development/resume-next/node_modules/@effect-ts/otel/_mjs/Processor/Simple/index.mjs:7
import { ConsoleSpanExporter, SimpleSpanProcessor } from "@opentelemetry/sdk-trace-base";
         ^^^^^^^^^^^^^^^^^^^
SyntaxError: Named export 'ConsoleSpanExporter' not found. The requested module '@opentelemetry/sdk-trace-base' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@opentelemetry/sdk-trace-base';
const { ConsoleSpanExporter, SimpleSpanProcessor } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:128:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:194:5)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:409:24)
    at async importModuleDynamicallyWrapper (node:internal/vm/module:435:15)
    at async loadConfig (/home/vince/development/resume-next/node_modules/next/dist/server/config.js:507:36)
    at async NextServer.prepare (/home/vince/development/resume-next/node_modules/next/dist/server/next.js:160:24)
    at async Server.<anonymous> (/home/vince/development/resume-next/node_modules/next/dist/server/lib/render-server.js:124:17) {
  type: 'SyntaxError'
}

I've tried to upgrade dependency, but this doesn't resolve this issue.

Node version is : 18.2.0
Npm version is : 8.9.0

Have you got any idea to bypass this issue ?

Thank you in advance

@colinhemphill
Copy link
Owner

@vincent-boulin That is an issue with the latest version of Contentlayer:

contentlayerdev/contentlayer#506

So I think upgrading dependencies is actually you're problem here. Make sure the Contentlayer deps are downgraded and see if that works for you.

@colinhemphill
Copy link
Owner

@vincent-boulin I landed an update that should temporarily resolve the issue until it's addressed upstream!

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