Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 将Meteor应用程序部署到Synology armv7:节点光纤存在问题`_Node.js_Meteor_Synology_Node Fibers_Fiber - Fatal编程技术网

Node.js 将Meteor应用程序部署到Synology armv7:节点光纤存在问题`

Node.js 将Meteor应用程序部署到Synology armv7:节点光纤存在问题`,node.js,meteor,synology,node-fibers,fiber,Node.js,Meteor,Synology,Node Fibers,Fiber,我花了几天时间试图在我的Synology ds213j(Armv7,512MB ram)上运行Meteor的构建应用程序 我不断遇到以下错误 ## There is an issue with `node-fibers` ## `/volume1/homes/user/app/bundle/programs/server/node_modules/fibers/bin/linux-arm-57/fibers.node` is missing. Try running this to fix t

我花了几天时间试图在我的Synology ds213j(Armv7,512MB ram)上运行Meteor的构建应用程序

我不断遇到以下错误

## There is an issue with `node-fibers` ##
`/volume1/homes/user/app/bundle/programs/server/node_modules/fibers/bin/linux-arm-57/fibers.node` is missing.

Try running this to fix the issue: /volume1/homes/user/.nvm/versions/node/v8.11.2/bin/node /volume1/homes/user/app/bundle/programs/server/node_modules/fibers/build
Error: /volume1/homes/user/app/bundle/programs/server/node_modules/fibers/bin/linux-arm-57/fibers.node: internal error
    at Object.Module._extensions..node (module.js:681:18)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/volume1/homes/user/app/bundle/programs/server/node_modules/fibers/fibers.js:13:39)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
/volume1/homes/user/app/bundle/programs/server/node_modules/fibers/fibers.js:22
                throw new Error('Missing binary. See message above.');
                ^

Error: Missing binary. See message above.
    at Object.<anonymous> (/volume1/homes/user/app/bundle/programs/server/node_modules/fibers/fibers.js:22:9)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/volume1/homes/user/app/bundle/programs/server/boot.js:1:75)
    at Module._compile (module.js:652:30)
##`节点光纤'存在问题##
`/卷1/homes/user/app/bundle/programs/server/node_modules/fibers/bin/linux-arm-57/fibers。缺少节点“”。
尝试运行此命令以解决问题:/volume1/homes/user/.nvm/versions/node/v8.11.2/bin/node/volume1/homes/user/app/bundle/programs/server/node\u modules/fibers/build
错误:/volume1/homes/user/app/bundle/programs/server/node_modules/fibers/bin/linux-arm-57/fibers.node:内部错误
在Object.Module.\u extensions..节点(Module.js:681:18)
在Module.load(Module.js:565:32)
在tryModuleLoad时(module.js:505:12)
在Function.Module.\u加载(Module.js:497:3)
at Module.require(Module.js:596:17)
根据需要(内部/module.js:11:18)
反对

  • 我的meteor应用程序使用Node 8.11.2,但synology唯一可用的Node版本是8.9.4。将其拆下并手动安装8.11.2

  • 构建一个默认meteor应用程序,检查我的应用程序是否存在问题

  • 到目前为止一切都不顺利,我不知道下一步该怎么办

    我怀疑问题在于光纤是为linux-arm-57构建的,我想我需要arm-7I? 我能做些什么来让这一切顺利进行


    谢谢

    下面我将介绍如何将应用程序正确部署到ARMv7设备。通过这样做,我将强调可能导致错误的重要步骤。我希望通过重复这些步骤,您的问题将得到解决

    1.构建您的生产应用程序
    • 确保应用程序在本地启动、运行并通过所有测试
    • 获取节点的当前开发版本。请注意,根据项目使用的meteor版本,它会有所不同。注意:下划线强调了匹配节点版本的重要性
    $cd~/path/to/meteor项目
    $meteor节点-v
    v8.9.4#此示例使用Meteor 1.6.1,它使用节点8.9.4
    
    • 使用
      build
      命令构建生产应用程序(我在这里稍微调整了一下规格)
    $cd~/path/to/meteor项目
    $meteor npm安装--生产
    $meteor build../build/deployment test--仅限服务器--体系结构os.linux.x86_32
    
    2.准备目标设备的环境
    • Meteor构建也是Node.js应用程序。您的设备需要Node.js的ARMv7版本。最简单的方法是使用(在新选项卡中打开以查看脚本)
    $curl-sLhttps://deb.nodesource.com/setup_8.x |sudo-E bash-
    $sudo apt get安装-y节点
    
    • 请注意,这也指出,“要从npm编译和安装本机插件,您可能还需要安装构建工具”。您需要这个,因为
      fibers
      bcrypt
      就是这样的本机插件
    $sudo apt get install-y build-sential
    
    • 验证已安装的节点版本
    $node-v
    v8.11.4#但我们需要v8.9.4
    
    • 要获得与您的开发版本完全匹配的正确版本node,,最简单的方法是使用npm
      n
    $sudo npm安装-g n
    $sudo n 8.9.4
    $ # ... 安装目标版本
    $node-v
    v8.9.4#如果这仍然是旧版本,只需重新启动shell即可
    
    • 如果您需要这方面的帮助,请阅读此
    • 最后在您的目标设备上安装
      mongodb
      >=2.6(重要!)(本答案中未涉及)
    3.在目标设备上安装生产应用程序
    • 将构建存档复制/移动/上载到目标设备
    • 提取部署包
    $cd~/path/to/deploymentapp
    $tar-xvzf./meteor-project.tar.gz#将所有内容提取到名为“bundle”的文件夹中
    
    • 在目标系统上安装npm依赖项
    $cd捆绑包/程序/服务器/
    $npm安装-生产
    
    • 如果您已复制了上述所有步骤,则应在此处安装npm软件包(尤其是本机软件包,如
      fibers
      bcrypt
      )。现在回到
      bundle/
      并启动应用程序:
    $cd..//
    $MONGO_网址=mongodb://yourmongodbcredentials node main.js
    
    我希望通过复制本指南,您将找到解决问题的方法



    添加SEO原因:本指南介绍如何在安装了ARMv7架构和Raspbian(32位)的Raspberry PI上部署Meteor应用程序。它也可以作为其他ARMV7设备的基础,如OP的Sythys.< /P> HIP补丁,良好的质量问题格式。我将尝试用我的覆盆子皮3复制你的问题,它也有ARM7。与此同时,你可以在网上搜索将Meteor应用程序部署到RPI,也许你已经在那里找到了一本好的todo手册。谢谢你的关注Jankapunkt!我会在搜索的同时谢谢你详尽的解释!下几天我会调查的。我将重新安装设备并开始清理,目前我不再相信我的系统在某种程度上没有损坏。我会让你知道的。你解决这个问题了吗?如果您的环境有问题,我们可以继续聊天。我真的很抱歉,我仍然需要调查它:(希望很快!