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

Cannot read properties of undefined (reading '__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED') #760

Open
ismaserrano opened this issue Sep 27, 2024 · 2 comments

Comments

@ismaserrano
Copy link

ismaserrano commented Sep 27, 2024

build: {
      sourcemap: true,
      rollupOptions: {
        output: {
          manualChunks(id) {
            if (id.includes('node_modules')) {
              return id
                .toString()
                .split('node_modules/')[1]
                .split('/')[0]
                .toString();
            }
          },
        },
      },
    },
    plugins: [
      react(),
      svgr(),
      sentryVitePlugin({...}),
      VitePWA({
        registerType: 'prompt',
        injectRegister: false,
        includeAssets: ['favicon.ico'],
        workbox: {
          globPatterns: ['**/*.{js,css,html,svg,png,ico}'],
          cleanupOutdatedCaches: true,
          clientsClaim: true,
          maximumFileSizeToCacheInBytes: 5000000,
        },
        devOptions: {
          enabled: false,
          navigateFallback: 'index.html',
          suppressWarnings: false,
          type: 'module',
        },
      }),
    ]
      .
      .
      .
      .

Vite 5.4.2, react and react-dom 18.3.1.

This is my configuration, but when I build with npm run build, all the process is ok, but when I try to serve the dist directory, I get this error:

image

Seems like react it's not embeded before react-dom... but when I'm trying to edit the order in the built index.html nothing occurs, the error still appears.

Can anyone help me?

@j-osephlong
Copy link

It's for your own good.

@ismaserrano
Copy link
Author

It's for your own good.

This is not helping me at all.

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