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

2.7.0+ production mode issue #6099

Closed
7 tasks done
jzs11 opened this issue Dec 13, 2021 · 15 comments
Closed
7 tasks done

2.7.0+ production mode issue #6099

jzs11 opened this issue Dec 13, 2021 · 15 comments
Labels
regression The issue only appears after a new release

Comments

@jzs11
Copy link

jzs11 commented Dec 13, 2021

Describe the bug

After upgrading to 2.7.0+, the production mode site is broken

image

Reproduction

Sry, I can not share my repo, here is the package.json

"dependencies": {
"@vitejs/plugin-vue": "2.0.0",
"@vuelidate/core": "^2.0.0-alpha.14",
"@vuelidate/validators": "^2.0.0-alpha.13",
"@vueuse/core": "^7.2.2",
"@vueuse/integrations": "^7.2.2",
"@vueuse/router": "^7.2.2",
"chart.js": "^3.6.2",
"core-js": "^3.19.3",
"devextreme": "^21.2.4",
"devextreme-aspnet-data-nojquery": "^2.8.4",
"devextreme-vue": "^21.2.4",
"lodash": "^4.17.21",
"primeflex": "^3.0.0",
"primeicons": "^5.0.0",
"primevue": "^3.10.0",
"prismjs": "^1.15.0",
"universal-cookie": "^4.0.4",
"vite": "2.7.2",
"vite-plugin-checker": "^0.3.4",
"vite-plugin-eslint": "^1.3.0",
"vue": "^3.2.24",
"vue-router": "^4.0.12",
"vue-tsc": "^0.3.0",
"vue-word-highlighter": "^1.0.4",
"vuedraggable": "^4.1.0",
"@vicons/fa": "^0.11.0",
"@vicons/utils": "^0.1.4"
},
"devDependencies": {
"@types/jest": "^27.0.3",
"@types/lodash": "4.14.178",
"@types/prismjs": "^1.16.5",
"@vue/compiler-sfc": "^3.2.24",
"@vue/eslint-config-airbnb": "^6.0.0",
"@vue/eslint-config-typescript": "^9.0.0",
"sass": "^1.44.0",
"typescript": "^4.4.3"
}

System Info

System:
    OS: Windows 10 10.0.22000
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
    Memory: 18.97 GB / 31.73 GB
  Binaries:
    Node: 17.0.1 - C:\Program Files\nodejs\node.EXE
    npm: 8.1.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (96.0.1054.53)
    Internet Explorer: 11.0.22000.120

Used Package Manager

npm

Logs

No response

Validations

@jzs11
Copy link
Author

jzs11 commented Dec 13, 2021

Downgrade to 2.6.14 fix the issue

@Niputi Niputi added needs reproduction regression The issue only appears after a new release labels Dec 13, 2021
@github-actions
Copy link

Hello @jzs11. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with need reproduction will be closed if they have no activity within 3 days.

@marklai1998
Copy link

marklai1998 commented Dec 14, 2021

This also happened to me with e$e is not a function

I have a minimal react setup and it only breaks in production

image

@patak-dev
Copy link
Member

Please create a repro using https://vite.new/react or upload it as a repo in github

@marklai1998
Copy link

I was able to solve it after some trial and error
I turned on sourcemap and serve it in local, the error is coming from @babel/runtime fn missing
Install that resolve the problem

Still not sure why it only happens after 2.7.0

@jzs11
Copy link
Author

jzs11 commented Dec 15, 2021

I was able to solve it after some trial and error I turned on sourcemap and serve it in local, the error is coming from @babel/runtime fn missing Install that resolve the problem

Still not sure why it only happens after 2.7.0

Do you mean install the @babel/runtime in the npm packages?

@marklai1998
Copy link

I was able to solve it after some trial and error I turned on sourcemap and serve it in local, the error is coming from @babel/runtime fn missing Install that resolve the problem
Still not sure why it only happens after 2.7.0

Do you mean install the @babel/runtime in the npm packages?

yes, but just my case, if it doesn't work for you you can turn on source map and debug it in dev tools

@jzs11
Copy link
Author

jzs11 commented Dec 15, 2021

I was able to solve it after some trial and error I turned on sourcemap and serve it in local, the error is coming from @babel/runtime fn missing Install that resolve the problem
Still not sure why it only happens after 2.7.0

Do you mean install the @babel/runtime in the npm packages?

yes, but just my case, if it doesn't work for you you can turn on source map and debug it in dev tools

Thanks dude, not my case. It really a show stopper for us to upgrade to 2.7 for vite. 😌

@jzs11
Copy link
Author

jzs11 commented Dec 15, 2021

Is this fixed @Shinigami92 ? Thanks

@Shinigami92
Copy link
Member

Shinigami92 commented Dec 15, 2021

Oh, I read the comments and thought #6099 (comment) solved it.
Will open, sry for confusion.

But still needs a minimal repro, otherwise it will close automatically in few days.

@Shinigami92 Shinigami92 reopened this Dec 15, 2021
@jzs11
Copy link
Author

jzs11 commented Dec 15, 2021

Oh, I read the comments and thought #6099 (comment) solved it. Will open, sry for confusion.

Thanks dude, I am trying to get a repo up when I have time.

@jzs11
Copy link
Author

jzs11 commented Dec 19, 2021

@Shinigami92 here is the repo - https://github.com/jzs11/vite-2.7/

Navigate into a workbook under the dev mode should not experience any errors
image

Then try
npm run build
npm run serve

You will see the error in the dev tool (Not exactly the same as the one I experienced, but it should give you something to start)

Downgrade the Vite into 2.6.14, the problem is gone.

Also, if you have time possible also take a look at another problem in v2.7.0
image

It is no longer respect the charset: false rule when publish.

Thanks,
Jing

@m430
Copy link

m430 commented Dec 21, 2021

I use react with vite@2.7.4, in development anything is right, but when I run npm run build, it broken. I think maybe it is because some modules is use commonjs require, so I add the @rollup/plugin-commonjs, but it doesn't work.

@alfeg
Copy link

alfeg commented Dec 23, 2021

@Shinigami92 have same issue and provided a repro #6061

@Shinigami92
Copy link
Member

So closing this in favor of #6061 👍

@github-actions github-actions bot locked and limited conversation to collaborators Jan 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
regression The issue only appears after a new release
Projects
None yet
Development

No branches or pull requests

7 participants