2

我正在尝试使用流星平台,特别是部署到 EC2,我正在使用以下基础https://github.com/yogiben/meteor-starter - 我在部署其他流星项目时没有问题,但是有了这个具体来说,我不断收到“PREPARE BUNDLE: FAILED”的提示。有关环境的详细信息,请参见下文,非常感谢任何帮助。

EC2 详细信息:

Ubuntu Server 16.04 LTS (HVM),SSD 卷类型 t2.xlarge CPUS:4 内存:16gb

安全组和密钥对都很好……允许来自所需来源的流量。

终端:MUP 设置

Started TaskList: Setup Docker
[ec2-18-234-99-193.compute-1.amazonaws.com] - Setup Docker
[ec2-18-234-99-193.compute-1.amazonaws.com] - Setup Docker: SUCCESS

Started TaskList: Setup Meteor
[ec2-18-234-99-193.compute-1.amazonaws.com] - Setup Environment
[ec2-18-234-99-193.compute-1.amazonaws.com] - Setup Environment:         
SUCCESS

Started TaskList: Setup Mongo
[ec2-18-234-99-193.compute-1.amazonaws.com] - Setup Environment
[ec2-18-234-99-193.compute-1.amazonaws.com] - Setup Environment:     
SUCCESS
[ec2-18-234-99-193.compute-1.amazonaws.com] - Copying mongodb.conf
[ec2-18-234-99-193.compute-1.amazonaws.com] - Copying mongodb.conf: 
SUCCESS

Started TaskList: Start Mongo
[ec2-18-234-99-193.compute-1.amazonaws.com] - Start Mongo
[ec2-18-234-99-193.compute-1.amazonaws.com] - Start Mongo: SUCCESS

终端 MUP 部署:

Started TaskList: Pushing Meteor App
[ec2-18-234-99-193.compute-1.amazonaws.com] - Pushing Meteor App Bundle 
to the Server
[ec2-18-234-99-193.compute-1.amazonaws.com] - Pushing Meteor App Bundle 
to the Server: SUCCESS
[ec2-18-234-99-193.compute-1.amazonaws.com] - Prepare Bundle
[ec2-18-234-99-193.compute-1.amazonaws.com] x Prepare Bundle: FAILED

      ------------------------------------STDERR------------------------------------
      The command '/bin/sh -c cd  /built_app/programs/server &&     npm install --unsafe-perm' returned a non-zero code: 1

      ------------------------------------STDOUT------------------------------------
      ze);
                                                                                       ^
../src/fibers.cc:787:84: warning: 'bool v8::Object::SetAccessor(v8::Local<v8::String>, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)' is deprecated (declared at /root/.node-gyp/8.4.0/include/node/v8.h:3120): Use maybe version [-Wdeprecated-declarations]
    fn->SetAccessor(uni::NewLatin1Symbol(isolate, "fibersCreated"), GetFibersCreated);
                                                                                    ^
../src/fibers.cc: In instantiation of 'void uni::MakeWeak(v8::Isolate*, v8::Persistent<T>&, P*) [with void (* F)(void*) = Fiber::WeakCallback; T = v8::Object; P = void]':
../src/fibers.cc:341:60:   required from here
../src/fibers.cc:55:3: error: no matching function for call to 'v8::Persistent<v8::Object>::SetWeak(void*&, <unresolved overloaded function type>)'
   handle.SetWeak(val, WeakCallbackShim<F>);
   ^
../src/fibers.cc:55:3: note: candidates are:
In file included from /root/.node-gyp/8.4.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/8.4.0/include/node/v8.h:544:18: note: template<class P> void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = P; T = v8::Object]
   V8_INLINE void SetWeak(P* parameter,
                  ^
/root/.node-gyp/8.4.0/include/node/v8.h:544:18: note:   template argument deduction/substitution failed:
../src/fibers.cc:55:3: note:   candidate expects 3 arguments, 2 provided
   handle.SetWeak(val, WeakCallbackShim<F>);
   ^
In file included from /root/.node-gyp/8.4.0/include/node/node.h:63:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/root/.node-gyp/8.4.0/include/node/v8.h:555:18: note: void v8::PersistentBase<T>::SetWeak() [with T = v8::Object]
   V8_INLINE void SetWeak();
                  ^
/root/.node-gyp/8.4.0/include/node/v8.h:555:18: note:   candidate expects 0 arguments, 2 provided
make: *** [Release/obj.target/fibers/src/fibers.o] Error 1
fibers.target.mk:102: recipe for target 'Release/obj.target/fibers/src/fibers.o' failed
make: Leaving directory '/built_app/programs/server/node_modules/fibers/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-1065-aws
gyp ERR! command "/opt/nodejs/bin/node" "/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /built_app/programs/server/node_modules/fibers
gyp ERR! node -v v8.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
Build failed
sh: 1: nodejs: not found
npm WARN meteor-dev-bundle@0.0.0 No description
npm WARN meteor-dev-bundle@0.0.0 No repository field.
npm WARN meteor-dev-bundle@0.0.0 No license field.

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! fibers@1.0.8 install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the fibers@1.0.8 install 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!     /root/.npm/_logs/2018-09-19T15_39_09_837Z-debug.log

解决了:

docker: {
  image: 'meteorhacks/meteord:base',
}

项目的流星版本不支持我的节点版本。

4

0 回答 0