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

thread '<unnamed>' panicked - I don't know how to reproduce #18179

Closed
7 tasks done
GustavoMelloGit opened this issue Sep 23, 2024 · 3 comments · Fixed by rollup/rollup#5674
Closed
7 tasks done

thread '<unnamed>' panicked - I don't know how to reproduce #18179

GustavoMelloGit opened this issue Sep 23, 2024 · 3 comments · Fixed by rollup/rollup#5674
Labels
bug: upstream Bug in a dependency of Vite

Comments

@GustavoMelloGit
Copy link

Describe the bug

Everytime i run npm run build i am receving the following error and i don't know what to do. It happens locally and also on aws amplify. We did not change anything really for it to start happening.

vite v5.4.7 building for production...
thread '<unnamed>' panicked at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc_common-0.39.0/src/syntax_pos.rs:702:18:
width 3 given for non-narrow character
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at library/core/src/panicking.rs:221:5:
panic in a function that cannot unwind
stack backtrace:
   0:        0x11ad6bd58 - _napi_register_module_v1
   1:        0x11ad09558 - <unknown>
   2:        0x11ad490c8 - _napi_register_module_v1
   3:        0x11ad6cde0 - _napi_register_module_v1
   4:        0x11ad6df94 - _napi_register_module_v1
   5:        0x11ad6d224 - _napi_register_module_v1
   6:        0x11ad6d1c0 - _napi_register_module_v1
   7:        0x11ad6d1b4 - _napi_register_module_v1
   8:        0x11ae81850 - _napi_register_module_v1
   9:        0x11ae818ac - _napi_register_module_v1
  10:        0x11ae81864 - _napi_register_module_v1
  11:        0x11ad02b64 - <unknown>
thread caused non-unwinding panic. aborting.
[1]    8102 abort      npm run build

Reproduction

none

Steps to reproduce

npm i => npm run build

System Info

System:
    OS: macOS 14.6.1
    CPU: (8) arm64 Apple M2
    Memory: 698.33 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.0 - /usr/local/bin/node
    npm: 10.2.4 - /usr/local/bin/npm
    pnpm: 9.10.0 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 128.0.6613.138
    Safari: 17.6

Used Package Manager

npm

Logs

Click to expand!
  vite:config bundled config file loaded in 38.90ms +0ms
  vite:config using resolved config: {
  vite:config   base: '/',
  vite:config   plugins: [
  vite:config     'vite:build-metadata',
  vite:config     'vite:watch-package-data',
  vite:config     'vite:pre-alias',
  vite:config     'alias',
  vite:config     'vite:react-babel',
  vite:config     'vite:react-refresh',
  vite:config     'vite-tsconfig-paths',
  vite:config     'vite:modulepreload-polyfill',
  vite:config     'vite:resolve',
  vite:config     'vite:html-inline-proxy',
  vite:config     'vite:css',
  vite:config     'vite:esbuild',
  vite:config     'vite:json',
  vite:config     'vite:wasm-helper',
  vite:config     'vite:worker',
  vite:config     'vite:asset',
  vite:config     'vite-plugin-node-polyfills',
  vite:config     'vite:wasm-fallback',
  vite:config     'vite:define',
  vite:config     'vite:css-post',
  vite:config     'vite:build-html',
  vite:config     'vite:worker-import-meta-url',
  vite:config     'vite:asset-import-meta-url',
  vite:config     'vite:force-systemjs-wrap-complete',
  vite:config     'commonjs',
  vite:config     'vite:data-uri',
  vite:config     'inject',
  vite:config     'vite:dynamic-import-vars',
  vite:config     'vite:import-glob',
  vite:config     'vite:build-import-analysis',
  vite:config     'vite:esbuild-transpile',
  vite:config     'vite:terser',
  vite:config     'vite:reporter',
  vite:config     'vite:load-fallback'
  vite:config   ],
  vite:config   publicDir: '/Users/gustavo/Documents/Nuvidio/companyV2/public',
  vite:config   server: {
  vite:config     preTransformRequests: true,
  vite:config     open: true,
  vite:config     port: 4020,
  vite:config     sourcemapIgnoreList: [Function: isInNodeModules$1],
  vite:config     middlewareMode: false,
  vite:config     fs: {
  vite:config       strict: true,
  vite:config       allow: [Array],
  vite:config       deny: [Array],
  vite:config       cachedChecks: undefined
  vite:config     }
  vite:config   },
  vite:config   css: { preprocessorOptions: { scss: [Object] }, lightningcss: undefined },
  vite:config   optimizeDeps: {
  vite:config     holdUntilCrawlEnd: true,
  vite:config     esbuildOptions: {
  vite:config       preserveSymlinks: false,
  vite:config       define: [Object],
  vite:config       jsx: 'automatic',
  vite:config       inject: [Array],
  vite:config       plugins: [Array]
  vite:config     },
  vite:config     include: [ 'react', 'react/jsx-dev-runtime', 'react/jsx-runtime' ],
  vite:config     exclude: [
  vite:config       '/Users/gustavo/Documents/Nuvidio/companyV2/node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.cjs',
  vite:config       '/Users/gustavo/Documents/Nuvidio/companyV2/node_modules/vite-plugin-node-polyfills/shims/global/dist/index.cjs',
  vite:config       '/Users/gustavo/Documents/Nuvidio/companyV2/node_modules/vite-plugin-node-polyfills/shims/process/dist/index.cjs'
  vite:config     ]
  vite:config   },
  vite:config   build: {
  vite:config     target: [ 'es2020', 'edge88', 'firefox78', 'chrome87', 'safari14' ],
  vite:config     cssTarget: [ 'es2020', 'edge88', 'firefox78', 'chrome87', 'safari14' ],
  vite:config     outDir: 'build',
  vite:config     assetsDir: 'assets',
  vite:config     assetsInlineLimit: 4096,
  vite:config     cssCodeSplit: true,
  vite:config     sourcemap: false,
  vite:config     rollupOptions: { onwarn: [Function: onwarn], plugins: [Array] },
  vite:config     minify: 'esbuild',
  vite:config     terserOptions: {},
  vite:config     write: true,
  vite:config     emptyOutDir: null,
  vite:config     copyPublicDir: true,
  vite:config     manifest: false,
  vite:config     lib: false,
  vite:config     ssr: false,
  vite:config     ssrManifest: false,
  vite:config     ssrEmitAssets: false,
  vite:config     reportCompressedSize: true,
  vite:config     chunkSizeWarningLimit: 500,
  vite:config     watch: null,
  vite:config     commonjsOptions: { include: [Array], extensions: [Array] },
  vite:config     dynamicImportVarsOptions: { warnOnError: true, exclude: [Array] },
  vite:config     modulePreload: { polyfill: true },
  vite:config     cssMinify: true
  vite:config   },
  vite:config   test: {
  vite:config     globals: true,
  vite:config     environment: 'jsdom',
  vite:config     setupFiles: './src/Tests/setup.ts'
  vite:config   },
  vite:config   esbuild: { jsxDev: false, jsx: 'automatic', jsxImportSource: undefined },
  vite:config   resolve: {
  vite:config     mainFields: [ 'browser', 'module', 'jsnext:main', 'jsnext' ],
  vite:config     conditions: [],
  vite:config     extensions: [
  vite:config       '.mjs',  '.js',
  vite:config       '.mts',  '.ts',
  vite:config       '.jsx',  '.tsx',
  vite:config       '.json'
  vite:config     ],
  vite:config     dedupe: [ 'react', 'react-dom' ],
  vite:config     preserveSymlinks: false,
  vite:config     alias: [
  vite:config       [Object], [Object], [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object], [Object], [Object],
  vite:config       [Object], [Object], [Object], [Object], [Object],
  vite:config       [Object], [Object]
  vite:config     ]
  vite:config   },
  vite:config   configFile: '/Users/gustavo/Documents/Nuvidio/companyV2/vite.config.ts',
  vite:config   configFileDependencies: [ '/Users/gustavo/Documents/Nuvidio/companyV2/vite.config.ts' ],
  vite:config   inlineConfig: {
  vite:config     root: undefined,
  vite:config     base: undefined,
  vite:config     mode: undefined,
  vite:config     configFile: undefined,
  vite:config     logLevel: undefined,
  vite:config     clearScreen: undefined,
  vite:config     build: {}
  vite:config   },
  vite:config   root: '/Users/gustavo/Documents/Nuvidio/companyV2',
  vite:config   decodedBase: '/',
  vite:config   rawBase: '/',
  vite:config   cacheDir: '/Users/gustavo/Documents/Nuvidio/companyV2/node_modules/.vite',
  vite:config   command: 'build',
  vite:config   mode: 'production',
  vite:config   ssr: {
  vite:config     target: 'node',
  vite:config     optimizeDeps: { noDiscovery: true, esbuildOptions: [Object] }
  vite:config   },
  vite:config   isWorker: false,
  vite:config   mainConfig: null,
  vite:config   bundleChain: [],
  vite:config   isProduction: true,
  vite:config   preview: {
  vite:config     port: undefined,
  vite:config     strictPort: undefined,
  vite:config     host: undefined,
  vite:config     https: undefined,
  vite:config     open: true,
  vite:config     proxy: undefined,
  vite:config     cors: undefined,
  vite:config     headers: undefined
  vite:config   },
  vite:config   envDir: '/Users/gustavo/Documents/Nuvidio/companyV2',
  vite:config   env: {
  vite:config     VITE_APP_BASENAME: '',
  vite:config     VITE_PORT: '4020',
  vite:config     VITE_APP_REAL_TIME_CONNECTION_STRING: 'https://dev.api.nuvidio.com',
  vite:config     VITE_APP_CONNECTION_STRING: 'https://dev.api.nuvidio.com',
  vite:config     VITE_APP_AUDITOR_API_URL: 'https://dev.api.nuvidio.com/auditor',
  vite:config     VITE_APP_VERSION: '2.23.1',
  vite:config     VITE_APP_ENVIRONMENT: 'homologation',
  vite:config     BASE_URL: '/',
  vite:config     MODE: 'production',
  vite:config     DEV: false,
  vite:config     PROD: true
  vite:config   },
  vite:config   assetsInclude: [Function: assetsInclude],
  vite:config   logger: {
  vite:config     hasWarned: false,
  vite:config     info: [Function: info],
  vite:config     warn: [Function: warn],
  vite:config     warnOnce: [Function: warnOnce],
  vite:config     error: [Function: error],
  vite:config     clearScreen: [Function: clearScreen],
  vite:config     hasErrorLogged: [Function: hasErrorLogged]
  vite:config   },
  vite:config   packageCache: Map(1) {
  vite:config     'fnpd_/Users/gustavo/Documents/Nuvidio/companyV2' => {
  vite:config       dir: '/Users/gustavo/Documents/Nuvidio/companyV2',
  vite:config       data: [Object],
  vite:config       hasSideEffects: [Function: hasSideEffects],
  vite:config       webResolvedImports: {},
  vite:config       nodeResolvedImports: {},
  vite:config       setResolvedCache: [Function: setResolvedCache],
  vite:config       getResolvedCache: [Function: getResolvedCache]
  vite:config     },
  vite:config     set: [Function (anonymous)]
  vite:config   },
  vite:config   createResolver: [Function: createResolver],
  vite:config   worker: { format: 'iife', plugins: '() => plugins', rollupOptions: {} },
  vite:config   appType: 'spa',
  vite:config   experimental: { importGlobRestoreExtension: false, hmrPartialAccept: false },
  vite:config   getSortedPlugins: [Function: getSortedPlugins],
  vite:config   getSortedPluginHooks: [Function: getSortedPluginHooks]
  vite:config } +187ms
vite v5.4.7 building for production...
transforming (1) index.html  vite:resolve 0.59ms bootstrap/scss/functions -> /Users/gustavo/Documents/Nuvidio/companyV2/node_modules/bootstrap/scss/_functions.scss +0ms
transforming (4) src/serviceWorker.js  vite:resolve 0.24ms scss/variables/variables -> null +54ms
  vite:resolve 0.38ms fonts/feather.eot?t=1525787366991 -> /Users/gustavo/Documents/Nuvidio/companyV2/src/@core/assets/fonts/feather/fonts/feather.eot?t=1525787366991 +224ms
  vite:resolve 0.50ms fonts/feather.eot?t=1525787366991 -> /Users/gustavo/Documents/Nuvidio/companyV2/src/@core/assets/fonts/feather/fonts/feather.eot?t=1525787366991 +0ms
  vite:resolve 1.33ms bootstrap/scss/variables -> /Users/gustavo/Documents/Nuvidio/companyV2/node_modules/bootstrap/scss/_variables.scss +32ms
transforming (12) node_modules/react-toastify/dist/react-toastify.esm.mjs  vite:resolve 1.43ms fonts/Krub-Light.ttf -> /Users/gustavo/Documents/Nuvidio/companyV2/node_modules/@nuvidio/react-components/lib/fonts/Krub-Light.ttf +94ms
  vite:resolve 1.46ms fonts/Krub-Regular.ttf -> /Users/gustavo/Documents/Nuvidio/companyV2/node_modules/@nuvidio/react-components/lib/fonts/Krub-Regular.ttf +0ms
  vite:resolve 1.49ms fonts/Krub-Medium.ttf -> /Users/gustavo/Documents/Nuvidio/companyV2/node_modules/@nuvidio/react-components/lib/fonts/Krub-Medium.ttf +0ms
  vite:resolve 1.51ms fonts/Krub-SemiBold.ttf -> /Users/gustavo/Documents/Nuvidio/companyV2/node_modules/@nuvidio/react-components/lib/fonts/Krub-SemiBold.ttf +0ms
  vite:resolve 1.54ms fonts/OpenSans-Light.ttf -> /Users/gustavo/Documents/Nuvidio/companyV2/node_modules/@nuvidio/react-components/lib/fonts/OpenSans-Light.ttf +0ms
  vite:resolve 1.54ms fonts/OpenSans-Regular.ttf -> /Users/gustavo/Documents/Nuvidio/companyV2/node_modules/@nuvidio/react-components/lib/fonts/OpenSans-Regular.ttf +0ms
  vite:resolve 1.53ms fonts/OpenSans-Medium.ttf -> /Users/gustavo/Documents/Nuvidio/companyV2/node_modules/@nuvidio/react-components/lib/fonts/OpenSans-Medium.ttf +1ms
  vite:resolve 1.93ms fonts/OpenSans-SemiBold.ttf -> /Users/gustavo/Documents/Nuvidio/companyV2/node_modules/@nuvidio/react-components/lib/fonts/OpenSans-SemiBold.ttf +0ms
  vite:resolve 0.21ms fonts/feather.woff?t=1525787366991 -> /Users/gustavo/Documents/Nuvidio/companyV2/src/@core/assets/fonts/feather/fonts/feather.woff?t=1525787366991 +209ms
transforming (19) src/Hooks/useLuxonLocale.ts  vite:resolve 0.63ms bootstrap/scss/mixins -> /Users/gustavo/Documents/Nuvidio/companyV2/node_modules/bootstrap/scss/_mixins.scss +29ms
transforming (32) node_modules/react/cjs/react-jsx-runtime.production.min.js  vite:resolve 0.13ms fonts/feather.ttf?t=1525787366991 -> /Users/gustavo/Documents/Nuvidio/companyV2/src/@core/assets/fonts/feather/fonts/feather.ttf?t=1525787366991 +13s
transforming (36) node_modules/i18next-http-backend/esm/index.js  vite:resolve 0.40ms bootstrap/scss/bootstrap -> /Users/gustavo/Documents/Nuvidio/companyV2/node_modules/bootstrap/scss/bootstrap.scss +578ms
  vite:resolve 0.70ms scss/variables/_variables-components -> null +263ms
transforming (48) src/Redux/Slices/CompanySlice.ts  vite:resolve 0.27ms fonts/feather.svg?t=1525787366991 -> /Users/gustavo/Documents/Nuvidio/companyV2/src/@core/assets/fonts/feather/fonts/feather.svg?t=1525787366991 +44ms
  vite:resolve 0.65ms ./Assets/images/backgrounds/text-chat-bg.png -> /Users/gustavo/Documents/Nuvidio/companyV2/src/Assets/images/backgrounds/text-chat-bg.png +421ms
transforming (142) node_modules/use-sync-external-store/shim/with-selector.js  vite:resolve 0.30ms react-toastify/dist/ReactToastify.css -> /Users/gustavo/Documents/Nuvidio/companyV2/node_modules/react-toastify/dist/ReactToastify.css +722ms
  vite:resolve 0.31ms bootstrap/scss/mixins/gradients -> /Users/gustavo/Documents/Nuvidio/companyV2/node_modules/bootstrap/scss/mixins/_gradients.scss +66ms
transforming (304) node_modules/@sentry/utils/esm/memo.js  vite:resolve 0.36ms bootstrap/scss/mixins/_gradients -> /Users/gustavo/Documents/Nuvidio/companyV2/node_modules/bootstrap/scss/mixins/_gradients.scss +941ms
transforming (2136) src/Assets/images/pages/login-v2-dark.svg  vite:resolve 0.74ms flatpickr/dist/flatpickr.css -> /Users/gustavo/Documents/Nuvidio/companyV2/node_modules/flatpickr/dist/flatpickr.css +2s
transforming (2681) node_modules/define-data-property/index.js  vite:resolve 0.07ms ../../../node_modules/perfect-scrollbar/css/perfect-scrollbar.css -> /Users/gustavo/Documents/Nuvidio/companyV2/node_modules/perfect-scrollbar/css/perfect-scrollbar.css +2s
transforming (2829) src/Templates/Department/DepartmentCreate/Tabs/GeneralCreateTab.tsx  vite:resolve 0.05ms ./react-draft-wysiwyg.css -> /Users/gustavo/Documents/Nuvidio/companyV2/src/@core/scss/react/libs/editor/react-draft-wysiwyg.css +673ms
thread '<unnamed>' panicked at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc_common-0.39.0/src/syntax_pos.rs:702:18:
width 3 given for non-narrow character
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at library/core/src/panicking.rs:221:5:
panic in a function that cannot unwind
stack backtrace:
   0:        0x118aebd58 - _napi_register_module_v1
   1:        0x118a89558 - <unknown>
   2:        0x118ac90c8 - _napi_register_module_v1
   3:        0x118aecde0 - _napi_register_module_v1
   4:        0x118aedf94 - _napi_register_module_v1
   5:        0x118aed224 - _napi_register_module_v1
   6:        0x118aed1c0 - _napi_register_module_v1
   7:        0x118aed1b4 - _napi_register_module_v1
   8:        0x118c01850 - _napi_register_module_v1
   9:        0x118c018ac - _napi_register_module_v1
  10:        0x118c01864 - _napi_register_module_v1
  11:        0x118a82b64 - <unknown>
thread caused non-unwinding panic. aborting.
[1]    8542 abort      npm run build

Validations

@gustavo-a-m
Copy link

gustavo-a-m commented Sep 23, 2024

This is an issue with Vite's dependency Rollup, running npm install -D [email protected] or add overrides to package.json resolves the problem while the library doesn't fix the error:

"overrides": {
    "rollup": "4.22.0"
},

Link to the issue rollup/rollup#5672.

@hi-ogawa hi-ogawa added bug: upstream Bug in a dependency of Vite and removed pending triage labels Sep 23, 2024
@thiagoboa
Copy link

thiagoboa commented Sep 24, 2024

This is an issue with Vite's dependency Rollup, running npm install -D [email protected] or add overrides to package.json resolves the problem while the library doesn't fix the error:

"overrides": {
    "rollup": "4.22.0"
},

Link to the issue rollup/rollup#5672.

@gustavo-a-m suggestion above worked for me, but with small changes:

  1. given that we have a monorepo and rollup was a shared peer dependency, we had to add the override at the root package.json file
  2. given that we install specific dependency versions, I had to define the overrides as such:
    "overrides": {
      "[email protected]": {
        "rollup": "4.22.0"
      }
    }
    • And then, rerun npm install -D [email protected]
    • Running npm ls rollup confirmed that it worked, since it started showing the overridden suffix after the specific rollup tree items

skamril added a commit to AntaresSimulatorTeam/AntaREST that referenced this issue Sep 26, 2024
skamril added a commit to AntaresSimulatorTeam/AntaREST that referenced this issue Sep 26, 2024
@sapphi-red
Copy link
Member

Closing as this is fixed by rollup 4.22.5.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug: upstream Bug in a dependency of Vite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants