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 null (reading 'render') #19339

Closed
7 tasks done
Yuiyis opened this issue Feb 2, 2025 · 3 comments
Closed
7 tasks done

Cannot read properties of null (reading 'render') #19339

Yuiyis opened this issue Feb 2, 2025 · 3 comments
Labels
bug: upstream Bug in a dependency of Vite pending triage

Comments

@Yuiyis
Copy link

Yuiyis commented Feb 2, 2025

Describe the bug

vite build error
Cannot read properties of null (reading 'render')
at ConditionalExpression.render (file:///D:/project/web/node_modules/rollup/dist/es/shared/node-entry.js:12221:24)
at TemplateLiteral.render (file:///D:/project/web/node_modules/rollup/dist/es/shared/node-entry.js:2905:28)
at TemplateLiteral.render (file:///D:/project/web/node_modules/rollup/dist/es/shared/node-entry.js:14671:15)
at renderCallArguments (file:///D:/project/web/node_modules/rollup/dist/es/shared/node-entry.js:11721:26)
at CallExpression.render (file:///D:/project/web/node_modules/rollup/dist/es/shared/node-entry.js:11948:9)
at ExpressionStatement.render (file:///D:/project/web/node_modules/rollup/dist/es/shared/node-entry.js:2909:23)
at ExpressionStatement.render (file:///D:/project/web/node_modules/rollup/dist/es/shared/node-entry.js:6416:15)
at renderStatementList (file:///D:/project/web/node_modules/rollup/dist/es/shared/node-entry.js:1870:25)
at BlockStatement.render (file:///D:/project/web/node_modules/rollup/dist/es/shared/node-entry.js:6486:13)
at IfStatement.render (file:///D:/project/web/node_modules/rollup/dist/es/shared/node-entry.js:12620:29)

Reproduction

https://gitee.com/yui_e/eee

Steps to reproduce

This is the error when creating a project using the official website method 'npm create vue@latest' and then introducing element-plus. This project cannot be built successfully.
If "Link To Reproduction" cannot be opened, you can run npm create vue@latest by yourself and then import element-plus.

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (12) x64 AMD Ryzen 5 7500F 6-Core Processor             
    Memory: 18.66 GB / 31.60 GB
  Binaries:
    Node: 22.13.1 - D:\node\node.EXE
    npm: 10.9.2 - D:\node\npm.CMD
  Browsers:
    Edge: Chromium (131.0.2903.112)
  npmPackages:
    @vitejs/plugin-legacy: 6.0.0 => 6.0.0
    @vitejs/plugin-vue: 5.2.1 => 5.2.1
    vite: 6.0.11 => 6.0.11

Used Package Manager

npm

Logs

No response

Validations

@hi-ogawa
Copy link
Collaborator

hi-ogawa commented Feb 2, 2025

This might be rollup v4.34.0 regression. Using v4.33.0 works. Here is element-plus minimal repro https://stackblitz.com/edit/vitejs-vite-axkhbu6d?file=package.json

Just noticed you also made rollup/rollup#5823

@sapphi-red sapphi-red added the bug: upstream Bug in a dependency of Vite label Feb 3, 2025
@Kijote
Copy link

Kijote commented Feb 3, 2025

Same error here, there's no implicit rollup extension imported in the package.json file:

{
  "name": "project name",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  },
  "dependencies": {
    "pinia": "^2.1.7",
    "vue": "^3.4.31",
    "vue-router": "^4.4.0"
  },
  "devDependencies": {
    "@vitejs/plugin-vue": "^5.0.5",
    "autoprefixer": "^10.4.19",
    "element-plus": "2.5.0",
    "postcss": "^8.4.40",
    "tailwindcss": "^3.4.7",
    "vite": "^5.3.4"
  }
}

Solved adding rollup v4.33.0. Thanks @hi-ogawa

@hi-ogawa
Copy link
Collaborator

hi-ogawa commented Feb 4, 2025

Closing as it's fixed upstream https://github.com/rollup/rollup/releases/tag/v4.34.2

@hi-ogawa hi-ogawa closed this as completed Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: upstream Bug in a dependency of Vite pending triage
Projects
None yet
Development

No branches or pull requests

4 participants