node.js - 在共享主机上使用 vue-cli-service build / npm run build 时出错(创建工作池时出错)
问题描述
当我尝试在共享托管服务上构建我的 Vue 项目时,它显示错误:
但是当我npm run build
在本地环境中运行时,它工作得很好。
错误详情:
Building for production.../home/intechpe/onlineku-admin/node_modules/thread-loader/dist/WorkerPool.js:53
throw new Error(`Failed to create the worker pool with workerId: ${workerId} and ${''}configuration: ${JSON.stringify(options)}. Please verify if you hit the OS open files limit.`);
^
Error: Failed to create the worker pool with workerId: 4 and configuration: {"parallelJobs":20}. Please verify if you hit the OS open files limit.
at new PoolWorker (/home/intechpe/onlineku-admin/node_modules/thread-loader/dist/WorkerPool.js:53:13)
at WorkerPool.createWorker (/home/intechpe/onlineku-admin/node_modules/thread-loader/dist/WorkerPool.js:337:23)
at WorkerPool.distributeJob (/home/intechpe/onlineku-admin/node_modules/thread-loader/dist/WorkerPool.js:331:28)
at runQueue (/home/intechpe/onlineku-admin/node_modules/neo-async/async.js:8097:9)
at _combinedTickCallback (internal/process/next_tick.js:132:7)
at process._tickCallback (internal/process/next_tick.js:181:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! onlineku-admin@0.1.0 build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the onlineku-admin@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/intechpe/.npm/_logs/2019-05-17T09_44_00_691Z-debug.log
解决方案
以前我在运行时在 cPanel ssh 上遇到同样的问题npm run build
。但是当我使用这个命令时它是有效的:
npx vue-cli-service build
推荐阅读
- sorting - 如何比较两个目录并将唯一的文件(名称或内容)移动到其他地方的第一个目录?
- python - 为什么我的 bot.get_user(user_id) 在 discord.py 中没有返回我?
- apache-superset - 为什么在 Apache Superset 中使用 SQL LAB 查询创建图表时会出现基本错误?
- python - 计算数据框中具有多列的成对行中的常见元素
- python - 减少 Google App Engine 部署时间?
- javascript - Javascript "+" 和 "-" 运算符的行为和用法
- postgresql - 使用 Prisma Migrate 运行集成测试时出错
- postgresql - 搜索 bigint 数组 posgreSQL 中是否存在任何子查询 bigint
- python - 为什么这会返回错误的最大值?
- python - Python:如何从特定行/列/行读取数据