npm打包项目报错:npm ERR! A complete log of this run can be found in:npm ERR! C:\Users\AppData\Roa...
今天用npm打包项目的时候,用 "npm run build" 打包发生以下错误:
npm ERR! missing script: build
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\AppData\Roaming\npm-cache\_logs\2022-09-16T08_06_52_296Z-debug.log
第一个 npm ERR! 是因为缺少脚本:构建
第二个 npm ERR! 是因为此运行的日志可以再以下位置找到:
npm ERR! C:\Users\AppData\Roaming\npm-cache\_logs\2022-09-16T08_06_52_296Z-debug.log
解决办法:
查看 package.json 中 scripts下打包命令 vue-cli-service build 是什么?我的如下:
"scripts": {
"dev": "vue-cli-service serve",
"build:prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src",
"test:unit": "jest --clearCache && vue-cli-service test:unit",
"test:ci": "npm run lint && npm run test:unit",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
},
我的打包命令是 build:prod ,因此使用 npm run build:prod,则打包成功。
如果没有打包命令,则需要自己手动添加打包命令。
npm打包项目报错:npm ERR! A complete log of this run can be found in:npm ERR! C:\Users\AppData\Roa...相关推荐
- npm ERR A complete log of this run can be found in npm ERR CUsersAppDataRoamingnpm-ca
npm ERR! A complete log of this run can be found in: npm ERR! C:Users**AppDataRoaming pm-cache_logs? ...
- npm ERR! cb.apply is not a function npm ERR! A complete log of this run can be found in: npm ERR!
npm ERR! cb.apply is not a function npm ERR! A complete log of this run can be found in: npm ERR! C: ...
- 【解决】npm ERR A complete log of this run can be found in npm ERR
有一些同学可能想配置react的运行环境,苦于不同的电脑遇到千奇百怪的问题和ERROR.下面是我遇到问题对应的解决方案,希望对你们有帮助. 本来我们的基本步骤是: 下载好nvm文件 在里面下载node ...
- 关于报错信息为A complete log of this run can be found in:
几天没打开项目,今天准备练习,运行项目的时候就出现了以上报错,按照网上教的解决方法把node-modules删了,重新执行npm install,还是不能生成node-modules文件.最后发现我打 ...
- npm 报错 : npm ERR! Maximum call stack size exceeded npm ERR! A complete log of this run can be found
之前,在npm下载包的时候出现一个错误: npm ERR! Maximum call stack size exceeded npm ERR! A complete log of this run c ...
- Macos下执行npm打包vue报错
问题描述 victorwk@localhost vue-ui % npm run build> saber-admin@2.4.1 build /Volumes/victor/java_abou ...
- npm ERR! A complete log of this run can be found in:
第一次接触vue项目的时候,拿了别人的代码,安装了依赖包以后一运行,发现有报错 npm ERR! A complete log of this run can be found in: npm ERR ...
- 运行VUE项目时,出现npm ERR! A complete log of this run can be found in:...报错
运行VUE项目时,出现npm ERR! A complete log of this run can be found in:报错时,分享以下一种解决方案. 本机的 node版本如下 解决方法 1. ...
- npm 报错 ERR Cannot read properties of null reading ‘package npm ERR A complete log of this run can
通过npm install 安装依赖报如下错误. 解决办法:尝试通过cnpm install 或yarn install 即可解决.
- npm 启动项目报错 Cannot find module ‘\@babel\compat-data\data\corejs3-shipped-proposals‘
执行 npm install -D babel-loader @babel/core @babel/preset-env webpack
最新文章
- Mysql高并发优化
- 程序员发现 Bug 的时候是怎样一种心境?
- LeetCode 669. Trim a Binary Search Tree修剪二叉搜索树 (C++)
- [Android]使用platform密钥来给apk文件签名的命令
- Memcached入门指南
- oracle 11g12c(pdbcdb)系统巡检
- Hadoop源码分析21:namenode概要
- 苹果承认iPhone 12“绿屏”等问题:目前正进行调查
- erp系统是什么软件有哪些
- 数据采集及采集工具八爪鱼的使用
- web前端开发面试题(四)
- 超全面整理fastAPI(从入门到运用),进来看十秒钟再走不迟
- linux系统中怎么配置路由,Linux系统中路由配置介绍
- vue-giant-tree 插件 报错. init if undefined
- Vision-and-Language Navigation: Interpreting visually-grounded navigation instructions in real env
- FPGA之道(16)FPGA开发流程之项目方案与FPGA设计方案
- oracle重建inventory,Oracle中Inventory目录作用以及如何重建此目录-Oracle
- Ubuntu14.04搭建LXR本地服务器阅读Linux内核代码
- TensorFlow 从入门到精通(13)—— NLP初探:电影评论感情分析
- element-ui message 显示重叠问题