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 build not working #5385

Closed
7 tasks done
Oluwasetemi opened this issue Oct 22, 2021 · 1 comment
Closed
7 tasks done

vite build not working #5385

Oluwasetemi opened this issue Oct 22, 2021 · 1 comment

Comments

@Oluwasetemi
Copy link

Describe the bug

Recently migrated my app from CRA to vitejs for the fast lighting speed it give but if I run vite build my app throws error.

+  πŸ•™ 13:36:51 βœ–  vite build
vite v2.6.7 building for production...
transforming (3) src/main.jsxError when using sourcemap for reporting an error: Can't resolve original location of error.
Error when using sourcemap for reporting an error: Can't resolve original location of error.
transforming (30) node_modules/react-redux/es/connect/connect.jsError when using sourcemap for reporting an error: Can't resolve original location of error.
Error when using sourcemap for reporting an error: Can't resolve original location of error.
βœ“ 55 modules transformed.
[vite:react-babel] /Users/oluwasetemi/Development/projects/contractors/chooselife/choose-life-frontend/node_modules/react-redux/es/components/Provider.js: Maximum call stack size exceeded
file: /Users/oluwasetemi/Development/projects/contractors/chooselife/choose-life-frontend/node_modules/react-redux/es/components/Provider.js
error during build:

Reproduction

https://github.com/Oluwasetemi/test-vitejs

System Info

System:
    OS: macOS 11.1
    CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
    Memory: 111.89 MB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node
    Yarn: 1.22.15 - ~/.yarn/bin/yarn
    npm: 7.20.3 - ~/.nvm/versions/node/v14.17.0/bin/npm
    Watchman: 2021.08.30.00 - /usr/local/bin/watchman
  Browsers:
    Chrome: 95.0.4638.54
    Chrome Canary: 97.0.4678.0
    Edge: 92.0.902.84
    Firefox Developer Edition: 94.0
    Safari: 14.0.2
  npmPackages:
    @vitejs/plugin-legacy: ^1.6.2 => 1.6.2 
    @vitejs/plugin-react: ^1.0.0 => 1.0.4 
    vite: ^2.6.4 => 2.6.7

Used Package Manager

yarn

Logs

vite build --debug
  vite:config bundled config file loaded in 237.01ms +0ms
[dotenv][DEBUG] did not match key and value when parsing line 2: # VITE_SERVER= https://staging.chooselife-wellness.com/graphql
  vite:config using resolved config: {
  vite:config   plugins: [
  vite:config     'alias',
  vite:config     'vite:react-babel',
  vite:config     'vite:react-refresh',
  vite:config     'vite:react-jsx',
  vite:config     'vite:modulepreload-polyfill',
  vite:config     'vite:resolve',
  vite:config     'vite:html-inline-script-proxy',
  vite:config     'vite:css',
  vite:config     'vite:esbuild',
  vite:config     'vite:json',
  vite:config     'vite:wasm',
  vite:config     'vite:worker',
  vite:config     'vite:asset',
  vite:config     'vite:define',
  vite:config     'vite:css-post',
  vite:config     'vite:build-html',
  vite:config     'commonjs',
  vite:config     'vite:data-uri',
  vite:config     'rollup-plugin-dynamic-import-variables',
  vite:config     'vite:asset-import-meta-url',
  vite:config     'vite:build-import-analysis',
  vite:config     'vite:esbuild-transpile',
  vite:config     'vite:reporter',
  vite:config     'vite:load-fallback'
  vite:config   ],
  vite:config   assetsInclude: [Function: assetsInclude],
  vite:config   build: {
  vite:config     target: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
  vite:config     polyfillModulePreload: true,
  vite:config     outDir: 'dist',
  vite:config     assetsDir: 'assets',
  vite:config     assetsInlineLimit: 4096,
  vite:config     cssCodeSplit: true,
  vite:config     cssTarget: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
  vite:config     sourcemap: false,
  vite:config     rollupOptions: {},
  vite:config     minify: 'esbuild',
  vite:config     terserOptions: {},
  vite:config     write: true,
  vite:config     emptyOutDir: null,
  vite:config     manifest: false,
  vite:config     lib: false,
  vite:config     ssr: false,
  vite:config     ssrManifest: 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   },
  vite:config   resolve: { dedupe: [ 'react', 'react-dom' ], alias: [ [Object], [Object] ] },
  vite:config   optimizeDeps: {
  vite:config     include: [ 'react/jsx-dev-runtime' ],
  vite:config     esbuildOptions: { keepNames: undefined, preserveSymlinks: undefined }
  vite:config   },
  vite:config   configFile: '/Users/oluwasetemi/Development/projects/contractors/chooselife/choose-life-frontend/vite.config.js',
  vite:config   configFileDependencies: [ 'vite.config.js' ],
  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/oluwasetemi/Development/projects/contractors/chooselife/choose-life-frontend',
  vite:config   base: '/',
  vite:config   publicDir: '/Users/oluwasetemi/Development/projects/contractors/chooselife/choose-life-frontend/public',
  vite:config   cacheDir: '/Users/oluwasetemi/Development/projects/contractors/chooselife/choose-life-frontend/node_modules/.vite',
  vite:config   command: 'build',
  vite:config   mode: 'production',
  vite:config   isProduction: false,
  vite:config   server: { fs: { strict: undefined, allow: [Array] } },
  vite:config   env: {
  vite:config     VITE_SERVER: 'http://localhost:9998/graphql',
  vite:config     VITE_GHM_SERVER: 'https://hra-api.ghmcorp.com/api/v2',
  vite:config     VITE_GHM_SERVER_TEST: 'https://hra-api-test.ghmcorp.com/api/v2',
  vite:config     VITE_RECAPTCHA: '6Lco-7YcAAAAAJcTzvHVbXaP_w8aGtu3D7jkl8Ks',
  vite:config     BASE_URL: '/',
  vite:config     MODE: 'production',
  vite:config     DEV: true,
  vite:config     PROD: false
  vite:config   },
  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   createResolver: [Function: createResolver]
  vite:config } +9ms

Validations

@aleclarson
Copy link
Member

Duplicate #5082

@github-actions github-actions bot locked and limited conversation to collaborators Nov 6, 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

2 participants