更新时间:2022-10-15 08:05:16
我假设您已经安装了 node js、pm2、mongodb 并且您已经创建了一个 DBNAME、带有 USERNAME 和 PASSWORD 的用户.
在你创建了一个流星项目之后.
meteor build --server-only 进行构建.
xyz.tar.gz
.使用命令 tar -xzf xyz.tar.gz
解压它.bundle/programs/server/
然后运行命令 npm install --production
export MONGO_URL="mongodb://username:password@127.0.0.1:27017/dbName";export ROOT_URL="http://localhost/";export PORT=3000代码>
bundle/
目录并使用命令pm2 start --name UID" main.js
运行pm2.pm2 show 0
I want to run the most basic Meteor app via Node. I make the following, orderly;
v4.6.1
But, it throws the following error;
module.js:327
throw err;
^
*Error: Cannot find module 'fibers’
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.
(/server/boot.js:1:75)
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)*
Why cannot I run the most basic Node app via those simple steps? Thank you!
I assume you have installed node js, pm2, mongodb and you have create a DBNAME, USER with USERNAME and PASSWORD.
After you create a meteor project.
meteor build --server-only .
xyz.tar.gz
will be created for you. Use command tar -xzf xyz.tar.gz
to untar it.bundle/programs/server/
and then run command npm install --production
export MONGO_URL="mongodb://username:password@127.0.0.1:27017/dbName";export ROOT_URL="http://localhost/";export PORT=3000
bundle/
directory and run pm2 using command pm2 start --name "UID" main.js
.pm2 show 0