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

@opentelemetry error #40

Closed
ThiagoUnder opened this issue Jul 10, 2023 · 5 comments
Closed

@opentelemetry error #40

ThiagoUnder opened this issue Jul 10, 2023 · 5 comments

Comments

@ThiagoUnder
Copy link

Cloned repo, pnpm installed and changed .env variables and on running got the error:

> next dev

- ready started server on 0.0.0.0:3000, url: http://localhost:3000
- info Loaded env from /Users/thiagoleobons/jul/repos/skateshop/.env.local
- error Failed to load next.config.mjs, see more info here https://nextjs.org/docs/messages/next-config-error
file:///Users/thiagoleobons/jul/repos/skateshop/node_modules/.pnpm/@effect-ts+otel@0.15.1_@effect-ts+core@0.60.5_@opentelemetry+api@1.4.1_@opentelemetry+core@1._vak64uwhuw23bp45xj3whrz3hy/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;
@sadmann7
Copy link
Owner

Did you update packages?

I once got this when i updated packages

@ThiagoUnder
Copy link
Author

ThiagoUnder commented Jul 11, 2023

Just did pnpm i
I saw now that there were both a package-lock and a pnpm-lock. Deleted node modules and package-lock and pnpm i again now I have

<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Parsing of /Users/thiagoleobons/jul/repos/skateshop/node_modules/.pnpm/@contentlayer+core@0.3.4_esbuild@0.18.11/node_modules/@contentlayer/core/dist/dynamic-build.js for build dependencies failed at 'import(`file://${compiledConfigPath}`)'.
<w> Build dependencies behind this expression are ignored and might cause incorrect cache invalidation.
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Parsing of /Users/thiagoleobons/jul/repos/skateshop/node_modules/.pnpm/@contentlayer+core@0.3.4_esbuild@0.18.11/node_modules/@contentlayer/core/dist/getConfig/index.js for build dependencies failed at 'import(`file://${modulePath}?x=${Date.now()}`)'.
<w> Build dependencies behind this expression are ignored and might cause incorrect cache invalidation.
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Parsing of /Users/thiagoleobons/jul/repos/skateshop/node_modules/.pnpm/@contentlayer+core@0.3.4_esbuild@0.18.11/node_modules/@contentlayer/core/dist/generation/generate-dotpkg.js for build dependencies failed at 'import(filePathJoin(generatedPkgPath, 'generated', 'index.mjs'))'.
<w> Build dependencies behind this expression are ignored and might cause incorrect cache invalidation.
<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Can't resolve 'markdown-wasm/dist/markdown.node.js' in '/Users/thiagoleobons/jul/repos/skateshop/node_modules/.pnpm/@contentlayer+core@0.3.4_esbuild@0.18.11/node_modules/@contentlayer/core/dist/markdown'
<w> while resolving 'markdown-wasm/dist/markdown.node.js' in /Users/thiagoleobons/jul/repos/skateshop/node_modules/.pnpm/@contentlayer+core@0.3.4_esbuild@0.18.11/node_modules/@contentlayer/core/dist/markdown as file
<w>  at resolve esm file markdown-wasm/dist/markdown.node.js
<w>  at file dependencies /Users/thiagoleobons/jul/repos/skateshop/node_modules/.pnpm/@contentlayer+core@0.3.4_esbuild@0.18.11/node_modules/@contentlayer/core/dist/markdown/markdown.js
<w>  at file /Users/thiagoleobons/jul/repos/skateshop/node_modules/.pnpm/@contentlayer+core@0.3.4_esbuild@0.18.11/node_modules/@contentlayer/core/dist/markdown/markdown.js
<w>  at resolve esm file ./markdown/markdown.js
<w>  at file dependencies /Users/thiagoleobons/jul/repos/skateshop/node_modules/.pnpm/@contentlayer+core@0.3.4_esbuild@0.18.11/node_modules/@contentlayer/core/dist/index.js
<w>  at file /Users/thiagoleobons/jul/repos/skateshop/node_modules/.pnpm/@contentlayer+core@0.3.4_esbuild@0.18.11/node_modules/@contentlayer/core/dist/index.js
<w>  at resolve esm file @contentlayer/core
<w>  at file dependencies /Users/thiagoleobons/jul/repos/skateshop/node_modules/.pnpm/next-contentlayer@0.3.4_contentlayer@0.3.4_esbuild@0.18.11_next@13.4.8_react-dom@18.2.0_react@18.2.0/node_modules/next-contentlayer/dist/plugin.js
<w>  at file /Users/thiagoleobons/jul/repos/skateshop/node_modules/.pnpm/next-contentlayer@0.3.4_contentlayer@0.3.4_esbuild@0.18.11_next@13.4.8_react-dom@18.2.0_react@18.2.0/node_modules/next-contentlayer/dist/plugin.js
<w>  at resolve esm file ./plugin.js
<w>  at file dependencies /Users/thiagoleobons/jul/repos/skateshop/node_modules/.pnpm/next-contentlayer@0.3.4_contentlayer@0.3.4_esbuild@0.18.11_next@13.4.8_react-dom@18.2.0_react@18.2.0/node_modules/next-contentlayer/dist/index.js
<w>  at file /Users/thiagoleobons/jul/repos/skateshop/node_modules/.pnpm/next-contentlayer@0.3.4_contentlayer@0.3.4_esbuild@0.18.11_next@13.4.8_react-dom@18.2.0_react@18.2.0/node_modules/next-contentlayer/dist/index.js
<w>  at resolve esm file next-contentlayer
<w>  at file dependencies /Users/thiagoleobons/jul/repos/skateshop/next.config.mjs
<w>  at file /Users/thiagoleobons/jul/repos/skateshop/next.config.mjs
<w>  at resolve commonjs /Users/thiagoleobons/jul/repos/skateshop/next.config.mjs

@sadmann7
Copy link
Owner

Oh someone must have pushed their package.lock.json or me.

@sadmann7 sadmann7 reopened this Jul 12, 2023
@sadmann7
Copy link
Owner

This is a contentlayer error on the latest version.

contentlayerdev/contentlayer#506

Don't update contelayer and next-contentlayer until fixed

@ThiagoUnder
Copy link
Author

This is a contentlayer error on the latest version.

contentlayerdev/contentlayer#506

Don't update contelayer and next-contentlayer until fixed

I made a comment there. The solution on the thread still throws an error for me when I run the dev server

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