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

Vite fails inside docker - RangeError: Invalid count value #1981

Closed
3 tasks done
alykamb opened this issue Feb 11, 2021 · 0 comments
Closed
3 tasks done

Vite fails inside docker - RangeError: Invalid count value #1981

alykamb opened this issue Feb 11, 2021 · 0 comments

Comments

@alykamb
Copy link
Contributor

alykamb commented Feb 11, 2021

⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.

  • Read the docs.
  • Use Vite >=2.0. (1.x is no longer supported)
  • If the issue is related to 1.x -> 2.0 upgrade, read the Migration Guide first.

Describe the bug

Vitejs fails inside docker.

Reproduction

Repo with the issue: https://github.com/alykamb/vite-docker-issue/tree/main

Clone the repo,
run yarn,
run docker-compose up

System Info

  • vite version: 2.0.0-beta.68
  • Operating System: Ubuntu 20.04
  • Node version: v14.14.0
  • Package manager (npm/yarn/pnpm) and version: yarn - 1.22.5

Logs (Optional if provided reproduction)

$ vite --debug
vite   |   vite:config bundled config file loaded in 196ms +0ms
vite   |   vite:config using resolved config: {
vite   |   vite:config   plugins: [
vite   |   vite:config     'vite:pre-alias',
vite   |   vite:config     'alias',
vite   |   vite:config     'vite:dynamic-import-polyfill',
vite   |   vite:config     'vite:resolve',
vite   |   vite:config     'vite:html',
vite   |   vite:config     'vite:css',
vite   |   vite:config     'vite:esbuild',
vite   |   vite:config     'vite:json',
vite   |   vite:config     'vite:wasm',
vite   |   vite:config     'vite:worker',
vite   |   vite:config     'vite:asset',
vite   |   vite:config     'vite:vue',
vite   |   vite:config     'vite:define',
vite   |   vite:config     'vite:css-post',
vite   |   vite:config     'vite:client-inject',
vite   |   vite:config     'vite:import-analysis'
vite   |   vite:config   ],
vite   |   vite:config   build: {
vite   |   vite:config     target: [ 'es2019', 'edge16', 'firefox60', 'chrome61', 'safari11' ],
vite   |   vite:config     polyfillDynamicImport: true,
vite   |   vite:config     outDir: 'dist',
vite   |   vite:config     assetsDir: 'assets',
vite   |   vite:config     assetsInlineLimit: 4096,
vite   |   vite:config     cssCodeSplit: true,
vite   |   vite:config     sourcemap: false,
vite   |   vite:config     rollupOptions: { input: '/srv/www/src/main.ts' },
vite   |   vite:config     commonjsOptions: { include: [Array], extensions: [Array] },
vite   |   vite:config     minify: 'terser',
vite   |   vite:config     terserOptions: {},
vite   |   vite:config     cleanCssOptions: {},
vite   |   vite:config     write: true,
vite   |   vite:config     emptyOutDir: null,
vite   |   vite:config     manifest: true,
vite   |   vite:config     lib: false,
vite   |   vite:config     ssr: false,
vite   |   vite:config     ssrManifest: false,
vite   |   vite:config     brotliSize: true,
vite   |   vite:config     chunkSizeWarningLimit: 500
vite   |   vite:config   },
vite   |   vite:config   server: {},
vite   |   vite:config   define: { __VUE_OPTIONS_API__: true, __VUE_PROD_DEVTOOLS__: false },
vite   |   vite:config   ssr: { external: [ 'vue', '@vue/server-renderer' ] },
vite   |   vite:config   configFile: '/srv/www/vite.config.ts',
vite   |   vite:config   inlineConfig: {
vite   |   vite:config     root: undefined,
vite   |   vite:config     base: undefined,
vite   |   vite:config     mode: undefined,
vite   |   vite:config     configFile: undefined,
vite   |   vite:config     logLevel: undefined,
vite   |   vite:config     clearScreen: undefined,
vite   |   vite:config     server: {}
vite   |   vite:config   },
vite   |   vite:config   root: '/srv/www',
vite   |   vite:config   base: '/',
vite   |   vite:config   publicDir: '/srv/www/public',
vite   |   vite:config   command: 'serve',
vite   |   vite:config   mode: 'development',
vite   |   vite:config   isProduction: false,
vite   |   vite:config   optimizeCacheDir: '/srv/www/node_modules/.vite',
vite   |   vite:config   alias: [ { find: /^\/@vite\//, replacement: [Function: replacement] } ],
vite   |   vite:config   env: { BASE_URL: '/', MODE: 'development', DEV: true, PROD: false },
vite   |   vite:config   assetsInclude: [Function: assetsInclude],
vite   |   vite:config   logger: {
vite   |   vite:config     hasWarned: false,
vite   |   vite:config     info: [Function: info],
vite   |   vite:config     warn: [Function: warn],
vite   |   vite:config     error: [Function: error],
vite   |   vite:config     clearScreen: [Function: clearScreen]
vite   |   vite:config   },
vite   |   vite:config   createResolver: [Function: createResolver]
vite   |   vite:config } +4ms
vite   |   vite:deps Hash is consistent. Skipping. Use --force to override. +0ms
vite   | /srv/www/node_modules/vite/dist/node/chunks/dep-f0a7a70d.js:3309
vite   |     const blank = '\n'.repeat(process.stdout.rows - 2);
vite   |                        ^
vite   | 
vite   | RangeError: Invalid count value
vite   |     at String.repeat (<anonymous>)
vite   |     at clearScreen (/srv/www/node_modules/vite/dist/node/chunks/dep-f0a7a70d.js:3309:24)
vite   |     at output (/srv/www/node_modules/vite/dist/node/chunks/dep-f0a7a70d.js:3345:21)
vite   |     at info (/srv/www/node_modules/vite/dist/node/chunks/dep-f0a7a70d.js:3354:13)
vite   |     at Server.<anonymous> (/srv/www/node_modules/vite/dist/node/chunks/dep-f0a7a70d.js:67947:13)
vite   |     at Object.onceWrapper (events.js:421:28)
vite   |     at Server.emit (events.js:327:22)
vite   |     at emitListeningNT (net.js:1352:10)
vite   |     at processTicksAndRejections (internal/process/task_queues.js:79:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
vite exited with code 1
alykamb pushed a commit to alykamb/vite that referenced this issue Feb 11, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant