我在我的 VPS 上部署我的应用程序时遇到问题。
知道我在不同版本的 UBUNTU 上尝试过很多次:
- Ubuntu 14.04(64 位)
- Ubuntu 16.04(64 位)
- Ubuntu 17.10(64 位)
命令:
mup init
然后我填写并编辑了我的 mup.js 文件,如下所示:
module.exports = {
servers: {
one: {
host: 'XX.XX.XX.XX',
username: 'root',
password: 'PASSWORD',
}
},
meteor: {
name: 'Ti3',
path: '../myapp',
servers: {
one: {}
},
buildOptions: {
serverOnly: true
},
env: {
ROOT_URL: 'https://m.example.com',
MONGO_URL: 'mongodb://localhost/meteor'
},
docker:{
image: 'abernix/meteord:base'
},
deployCheckWaitTime: 96,
enableUploadProgressBar: false
},
mongo: {
oplog: true,
port: 27017,
version: '3.4.1',
servers: {
one: {}
}
}
};
然后:
mup setup
结果很好:
Started TaskList: Setup Docker
[XX.XX.XX.XX] - Setup Docker
[XX.XX.XX.XX] - Setup Docker: SUCCESS
Started TaskList: Setup Meteor
[XX.XX.XX.XX] - Setup Environment
[XX.XX.XX.XX] - Setup Environment: SUCCESS
Started TaskList: Setup Mongo
[XX.XX.XX.XX] - Setup Environment
[XX.XX.XX.XX] - Setup Environment: SUCCESS
[XX.XX.XX.XX] - Copying mongodb.conf
[XX.XX.XX.XX] - Copying mongodb.conf: SUCCESS
Started TaskList: Start Mongo
[XX.XX.XX.XX] - Start Mongo
[XX.XX.XX.XX] - Start Mongo: SUCCESS
Next, you should run:
mup deploy
最后:
mup deploy --settings=settings.json
结果:
Started TaskList: Pushing Meteor App
[XX.XX.XX.XX] - Pushing Meteor App Bundle to the Server
[XX.XX.XX.XX] - Pushing Meteor App Bundle to the Server: SUCCESS
[XX.XX.XX.XX] - Prepare Bundle
[XX.XX.XX.XX] - Prepare Bundle: SUCCESS
Started TaskList: Configuring App
[XX.XX.XX.XX] - Pushing the Startup Script
[XX.XX.XX.XX] - Pushing the Startup Script: SUCCESS
[XX.XX.XX.XX] - Sending Environment Variables
[XX.XX.XX.XX] - Sending Environment Variables: SUCCESS
Started TaskList: Start Meteor
[XX.XX.XX.XX] - Start Meteor
[XX.XX.XX.XX] - Start Meteor: SUCCESS
[XX.XX.XX.XX] - Verifying Deployment
[XX.XX.XX.XX] x Verifying Deployment: FAILED
------------------------------------STDERR------------------------------------
Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
=> Starting meteor app on port:80
/built_app/programs/server/node_modules/fibers/future.js:280
throw(ex);
^
Error: Cannot find module './driver/base'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/ddp-server/node_modules/sockjs/nod
e_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver.js:9:14)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
=> Starting meteor app on port:80
/built_app/programs/server/node_modules/fibers/future.js:280
throw(ex);
^
Error: Cannot find module './driver/base'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/ddp-server/node_modules/sockjs/nod
e_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver.js:9:14)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
=> Starting meteor app on port:80
/built_app/programs/server/node_modules/fibers/future.js:280
throw(ex);
^
Error: Cannot find module './driver/base'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/ddp-server/node_modules/sockjs/nod
e_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver.js:9:14)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
=> Starting meteor app on port:80
/built_app/programs/server/node_modules/fibers/future.js:280
throw(ex);
^
Error: Cannot find module './driver/base'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/ddp-server/node_modules/sockjs/nod
e_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver.js:9:14)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
=> Starting meteor app on port:80
/built_app/programs/server/node_modules/fibers/future.js:280
throw(ex);
^
Error: Cannot find module './driver/base'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/ddp-server/node_modules/sockjs/nod
e_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver.js:9:14)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
------------------------------------STDOUT------------------------------------
Container has no IP Address, likely from it restarting.
Container has no IP Address, likely from it restarting.
Container has no IP Address, likely from it restarting.
Container has no IP Address, likely from it restarting.
Container has no IP Address, likely from it restarting.
Container has no IP Address, likely from it restarting.
Container has no IP Address, likely from it restarting.
Container has no IP Address, likely from it restarting.
Container has no IP Address, likely from it restarting.
Container has no IP Address, likely from it restarting.
=> Container status:
restarted: 8 times {"Bridge":"","SandboxID":"00bb7547050558848ad7653c9abc34a93c7da49a1dc1b89112d7ee92e7e39f01","
HairpinMode":false,"LinkLocalIPv6Address":"","LinkLocalIPv6PrefixLen":0,"Ports":{},"SandboxKey":"/var/run/docker/netns/0
0bb75470505","SecondaryIPAddresses":null,"SecondaryIPv6Addresses":null,"EndpointID":"","Gateway":"","GlobalIPv6Address":
"","GlobalIPv6PrefixLen":0,"IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","MacAddress":"","Networks":{"bridge":{"IPAMCo
nfig":null,"Links":null,"Aliases":null,"NetworkID":"499449ebea418f87e1471b837748344d48771428cfec20d0e6f597a8cffc6b61","E
ndpointID":"","Gateway":"","IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":
0,"MacAddress":"","DriverOpts":null}}} {"Status":"restarting","Running":true,"Paused":false,"Restarting":true,"OOMKilled
":false,"Dead":false,"Pid":0,"ExitCode":1,"Error":"","StartedAt":"2018-03-03T23:33:52.871342871Z","FinishedAt":"2018-03-
03T23:33:55.0535249Z"}
=> Logs:
To see more logs type 'mup logs --tail=200'
------------------------------------------------------------------------------
我试图从很多天开始找出问题,但没有任何成功。
我正在Windows下开发:
- 节点 V8.9.0
- NPM V5.5.1
我的应用程序在本地运行良好,没有任何问题。
需要帮助来解决这个问题,如果你有,你可以提出另一个解决方案。
我试过什么?
- 我删除了文件夹 node_module 并重新安装了它们:
meteor npm install
结果一样!
提前致谢。