-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Nuxt source maps and environment variables #13530
Comments
@AnthonyRuelle thanks for reporting this. Would you mind providing concrete code examples of what you did with regards to environment variables? I fear the issue about SSL is out of our control and you need to check your server configuration. |
I'm facing an issue where I can't access my environment variables via process.env in my sentry.client.config.ts file. Here are the details: sentry.client.config.ts File (at the project root): import { init } from '@sentry/nuxt';
const dsn = process.env.SENTRY_DSN as string;
const release = process.env.RELEASE_BACKOFFICE as string;
const environment = process.env.APP_ENV as string;
console.log('process:', process);
console.log('Sentry DSN:', dsn);
console.log('Sentry release:', release);
console.log('Sentry environment:', environment);
init({
dsn,
release,
environment,
enabled: true,
}); nuxt.config.ts: export default {
runtimeConfig: {
public: {
APP_ENV: process.env.APP_ENV,
RELEASE_BACKOFFICE: process.env.RELEASE_BACKOFFICE,
SENTRY_DSN: process.env.SENTRY_DSN,
},
},
}; .env File: Problem: |
Well, In the next version we release |
Version with |
I am in latest version (8.30.0) and when i used the useRuntimeConfig, i have this error: [nuxt] A composable that requires access to the Nuxt instance was called outside of a plugin, Nuxt hook, Nuxt middleware, or Vue setup function. This is probably not a Nuxt bug. Find out more at sentry.client.config.ts: |
This warning can be ignored, as the file will be wrapped in a Nuxt context by the Sentry Nuxt module as you can see here (it is within But I see that this is not picked up by Nuxt. Does it work if you add |
Originally posted by @AnthonyRuelle in #9095
The text was updated successfully, but these errors were encountered: