[英]Apex Up - Error: Cannot find module 'debug'
The error persists after I CLI enter up stack delete
and also when I CLI enter up
in an alternative directory that I know worked previously. 错误仍然存在后,我CLI中键入
up stack delete
,也当我CLI中键入up
的,我知道以前工作的备选目录。 Error also persists if I revert inconsequential changes to a prior working state. 如果我将无关紧要的更改恢复到先前的工作状态,错误也会继续存在。
Changing the name field in the up.json
file results in a successful deploy in the alternate directory! 更改
up.json
文件中的名称字段会导致在备用目录中成功部署! But something about deploying with the same alternate name from my problem directory causes the issue again. 但是从我的问题目录中使用相同的备用名称进行部署的某些问题再次导致了该问题。
npm i -S debug
does not help. npm i -S debug
无济于事。
Has anyone else experienced and resolved this problem somehow? 有没有其他人以某种方式遇到并解决了这个问题?
UPDATE: Getting closer. 更新:越来越近了。 By commenting things in and out I've got the error
通过进出注释,我得到了错误
"Error: Cannot find module './src/resolvers'"
“错误:找不到模块'./src/resolvers'”
From line: 从行:
var resolvers_1 = require("./src/resolvers");
Changing to: 更改为:
var resolvers_1 = require("./resolvers");
fixes the single import issue, but not the remaining... 解决了单个导入问题,但未解决其余问题...
I'd move the index.js file to the src directory and keep a flat file structure... but I have complex reasons I can't do that. 我会将index.js文件移动到src目录并保持平面文件结构...但是我有复杂的原因无法执行此操作。
"apex logs" of issue: 问题的“顶点日志”:
Aug 31st 05:58:27pm INFO staging 88776d6 initializing
8月31日05:58:27 pm INFO阶段88776d6初始化
Aug 31st 05:58:27pm INFO staging 88776d6 starting app: PORT=33461 command=node dist/index.js
8月31日05:58:27 pm信息登台88776d6启动应用程序:PORT = 33461命令=节点dist / index.js
Aug 31st 05:58:27pm INFO staging 88776d6 started app
8月31日05:58:27 pm INFO分期88776d6启动了应用
Aug 31st 05:58:27pm INFO staging 88776d6 waiting for app to listen on PORT
8月31日05:58:27 pm INFO登台88776d6等待应用在端口上监听
Aug 31st 05:58:28pm ERRO staging 88776d6 module.js:549
8月31日05:58:28 pm ERRO登台88776d6 module.js:549
Aug 31st 05:58:28pm ERRO staging 88776d6 throw err;
8月31日05:58:28 pm ERRO进行88776d6投掷err;
Aug 31st 05:58:28pm ERRO staging 88776d6 ^
8月31日05:58:28 pm ERRO分期88776d6 ^
Aug 31st 05:58:28pm ERRO staging 88776d6
8月31日05:58:28 pm ERRO分期88776d6
Aug 31st 05:58:28pm ERRO staging 88776d6 Error: Cannot find module 'debug'
8月31日05:58:28 pm ERRO登台88776d6错误:找不到模块“调试”
Aug 31st 05:58:28pm ERRO staging 88776d6 at Function.Module._resolveFilename (module.js:547:15)
8月31日05:58:28 pm ERRO在Function.Module._resolveFilename(module.js:547:15)上将88776d6升级
Aug 31st 05:58:28pm ERRO staging 88776d6 at Function.Module._load (module.js:474:25)
8月31日05:58:28 pm ERRO在Function.Module._load(module.js:474:25)上将88776d6升级
Aug 31st 05:58:28pm ERRO staging 88776d6 at Module.require (module.js:596:17)
8月31日05:58:28 pm ERRO在Module.require上将88776d6升级(module.js:596:17)
Aug 31st 05:58:28pm ERRO staging 88776d6 at require (internal/module.js:11:18)
8月31日05:58:28 pm ERRO在需要时将88776d6升级(internal / module.js:11:18)
Aug 31st 05:58:28pm ERRO staging 88776d6 at Object.
8月31日05:58:28 pm ERRO在Object上表演了88776d6。 (/var/task/node_modules/finalhandler/index.js:14:13)
(/var/task/node_modules/finalhandler/index.js:14:13)
Aug 31st 05:58:28pm ERRO staging 88776d6 at Module._compile (module.js:652:30)
8月31日05:58:28 pm ERRO在Module._compile上将88776d6升级(module.js:652:30)
Aug 31st 05:58:28pm ERRO staging 88776d6 at Object.Module._extensions..js (module.js:663:10)
8月31日05:58:28 pm ERRO在Object.Module._extensions..js上将88776d6升级(module.js:663:10)
Aug 31st 05:58:28pm ERRO staging 88776d6 at Module.load (module.js:565:32)
8月31日05:58:28 pm ERRO在Module.load上将88776d6升级(module.js:565:32)
Aug 31st 05:58:28pm ERRO staging 88776d6 at tryModuleLoad (module.js:505:12)
8月31日05:58:28 pm ERRO在tryModuleLoad(module.js:505:12)登台88776d6
Aug 31st 05:58:28pm ERRO staging 88776d6 at Function.Module._load (module.js:497:3)
8月31日05:58:28 pm ERRO在Function.Module._load(module.js:497:3)上将88776d6升级
Aug 31st 05:58:42pm FATA staging 88776d6 error creating handler: waiting for http://127.0.0.1:33461 to be in listening state: timed out after 15s: name=clowdfuncserver type=server
8月31日05:58:42 pm FATA分段88776d6错误创建处理程序:等待http://127.0.0.1:33461处于侦听状态:15秒后超时:name = clowdfuncserver type = server
Aug 31st 05:58:42pm INFO 2018-09-01T00:58:42.959Z 22adf73a-ad82-11e8-9c6c-79de5ffabc3f Error: read ECONNRESET
8月31日05:58:42 pm信息2018-09-01T00:58:42.959Z 22adf73a-ad82-11e8-9c6c-79de5ffabc3f错误:读取ECONNRESET
at _errnoException (util.js:1022:11)在_errnoException(util.js:1022:11)
at Pipe.onread (net.js:628:25)在Pipe.onread(net.js:628:25)
Despite additional issues blocking me, this webpack configuration worked for me: 尽管有其他问题阻止了我,但此webpack配置对我仍然有效:
// webpack.config.js
module.exports = {
entry: "./src/index.ts",
module: {
rules: [
{
exclude: [/node_modules/],
test: /\.tsx?$/,
use: "ts-loader"
},
{
include: /node_modules/,
test: /\.mjs$/,
type: "javascript/auto"
}
]
},
node: false,
output: {
filename: "index.js",
path: path.join(__dirname, "dist")
},
resolve: {
extensions: [".tsx", ".ts", ".js", ".mjs"]
},
target: "node"
};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.