当前位置: 首页 > news >正文

Cannot add property 0, object is not extensible

nuxt3构建本地没问题线上突然报错,本地用的pnpm锁了rollup版本,服务器用的npm没锁,在rollup更新4.41.0 -> 4.45.0时报错

> nuxt-app@ build D:\Projects\Company\spellai-nuxt
> nuxt buildNuxt 3.17.1 with Nitro 2.11.13                                                                                                                                             nuxi 15:59:17  WARN  You have disallowed robots accessing /_nuxt/**, this may prevent your site from being indexed correctly.                                                    @nuxt/robots 15:59:20  ℹ Building for Nitro preset: node-server                                                                                                                                  nuxi 15:59:20   
ℹ Building client...                                                                                                                                                           15:59:21   
ℹ vite v6.3.5 building for production...                                                                                                                                       15:59:21   
ℹ ✓ 2510 modules transformed.                                                                                                                                                  15:59:32   ERROR  ✗ Build failed in 10.78s                                                                                                                                                15:59:32  ERROR  Nuxt Build Error: Cannot add property 0, object is not extensible                                                                                                  nuxi 15:59:32  at Array.push (<anonymous>)at ConditionalExpression.getLiteralValueAtPath (/D:/Projects/Company/spellai-nuxt/node_modules/.pnpm/rollup@4.45.0/node_modules/rollup/dist/es/shared/node-entry.js:12270:45)at /D:/Projects/Company/spellai-nuxt/node_modules/.pnpm/rollup@4.45.0/node_modules/rollup/dist/es/shared/node-entry.js:5064:30at EntityPathTracker.withTrackedEntityAtPath (/D:/Projects/Company/spellai-nuxt/node_modules/.pnpm/rollup@4.45.0/node_modules/rollup/dist/es/shared/node-entry.js:2014:24)at LocalVariable.getLiteralValueAtPath (/D:/Projects/Company/spellai-nuxt/node_modules/.pnpm/rollup@4.45.0/node_modules/rollup/dist/es/shared/node-entry.js:5062:33)at Identifier.getLiteralValueAtPath (/D:/Projects/Company/spellai-nuxt/node_modules/.pnpm/rollup@4.45.0/node_modules/rollup/dist/es/shared/node-entry.js:5207:48)at BinaryExpression.getLiteralValueAtPath (/D:/Projects/Company/spellai-nuxt/node_modules/.pnpm/rollup@4.45.0/node_modules/rollup/dist/es/shared/node-entry.js:11785:37)at IfStatement.getTestValue (/D:/Projects/Company/spellai-nuxt/node_modules/.pnpm/rollup@4.45.0/node_modules/rollup/dist/es/shared/node-entry.js:12806:77)at IfStatement.hasEffects (/D:/Projects/Company/spellai-nuxt/node_modules/.pnpm/rollup@4.45.0/node_modules/rollup/dist/es/shared/node-entry.js:12722:32)at IfStatement.shouldBeIncluded (/D:/Projects/Company/spellai-nuxt/node_modules/.pnpm/rollup@4.45.0/node_modules/rollup/dist/es/shared/node-entry.js:2928:62)ELIFECYCLE  Command failed with exit code 1.

 解决办法
npm锁定rollup版本

"devDependencies": { "rollup": "4.41.0" }

http://www.lryc.cn/news/587743.html

相关文章:

  • 收集飞花令碎片——VS调试技巧
  • Linux(Ubuntu)硬盘使用情况解析(已房子举例)
  • 中间件部署
  • Ubuntu22.04 python环境管理
  • LabVIEW-Origin 船模数据处理系统
  • ubuntu之坑(十五)——设备树
  • SnapKit介绍与使用
  • EPLAN 电气制图(八):宏应用与变频器控制回路绘制全攻略
  • 基于esp32系列的开源无线dap-link项目使用介绍
  • RocketMQ 5.x初体验
  • Linux 音频的基石: ALSA
  • React 第六十九节 Router中renderMatches的使用详解及注意事项
  • Android 性能优化:启动优化全解析
  • 019_工具集成与外部API调用
  • LabVIEW浏览器ActiveX事件交互
  • SpringMVC1
  • 数字孪生技术引领UI前端设计新潮流:智能交互界面的个性化定制
  • 【Linux系统】进程切换 | 进程调度——O(1)调度队列
  • RxSwift的介绍与使用
  • Android展示加载PDF
  • SAP ERP与微软ERP dynamics对比,两款云ERP产品有什么区别?
  • ETF期权的涨跌策略是什么?
  • vue3 JavaScript 数据累加 reduce
  • Jetpack Compose 重组陷阱:一个“乌龙”带来的启示
  • 数字孪生技术驱动UI前端革新:实现产品设计的虚拟仿真与实时反馈
  • SpringMVC3
  • 计算机毕业设计Java轩辕购物商城管理系统 基于 SpringBoot 的轩辕电商商城管理系统 Java 轩辕购物平台管理系统设计与实现
  • CICS Application Programming Fundamentals 第4章
  • 74、【OS】【Nuttx】【启动】深入理解 caller-saved 和 callee-saved(下)
  • 游戏框架笔记