当前位置: 首页 > 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.xdnf.cn/news/1120051.html

相关文章:

  • 【橘子分布式】Thrift RPC(理论篇)
  • iOS APP 上架流程:跨平台上架方案的协作实践记录
  • [Nagios Core] 通知系统 | 事件代理 | NEB模块,事件,回调
  • sqli-labs靶场通关笔记:第11-16关 POST请求注入
  • 迁移学习之图像预训练理解
  • 《大数据技术原理与应用》实验报告一 熟悉常用的Linux操作和Hadoop操作
  • OpenCV 视频处理与摄像头操作详解
  • iOS高级开发工程师面试——Objective-C 语言特性
  • 水务工程中自动化应用:EtherNet/IP转PROFIBUS DP连接超声波流量计
  • vscode 安装 esp ide环境
  • 云原生核心技术解析:Docker vs Kubernetes vs Docker Compose
  • 穿透、误伤与回环——Redis 缓存防御体系的负向路径与治理艺术
  • 基于 Gitlab、Jenkins与Jenkins分布式、SonarQube 、Nexus 的 CiCd 全流程打造
  • AUTOSAR进阶图解==>AUTOSAR_SWS_EthernetInterface
  • GitCode 使用高频问题及解决方案
  • 技嘉UEFI固件SMM漏洞使系统面临固件植入和持久控制风险
  • AI和运维的故事
  • Faiss库
  • 017 进程控制 —— 终止进程
  • C语言-流程控制
  • 深入浅出Kafka Consumer源码解析:设计哲学与实现艺术
  • gitlab-ci.yml
  • Spark 和 Hadoop MapReduce 的基本概念及区别
  • 代码随想录算法训练营第四十九天|单调栈part2
  • PHP password_verify() 函数
  • vue vxe-tree 树组件加载大量节点数据,虚拟滚动的用法
  • 【AutoCAD全网最新版】AutoCAD 2026 保姆级下载安装注册使用详细图文教程
  • 借助DeepSeek编写输出漂亮表格的chdb客户端
  • [源力觉醒 创作者计划]_文心大模型4.5开源部署指南:从技术架构到实战落地
  • sfe_py的应力云图计算与显示step by step