Node.js Easyrtc部署在Heroku上失败

问题描述 投票:2回答:1

easyRTC服务器在本地主机上工作正常,但是当我在Heroku上部署它时,会导致构建失败并给出此日志

   Node.js app detected

   Creating runtime environment

   NPM_CONFIG_LOGLEVEL=error
   NODE_ENV=production
   NODE_MODULES_CACHE=true
   NODE_VERBOSE=false

   Installing binaries
   engines.node (package.json):  >=0.8
   engines.npm (package.json):   unspecified (use default)

   Resolving node version >=0.8...
   Downloading and installing node 12.2.0...
   Using default npm version: 6.9.0

   Restoring cache
   - node_modules

   Installing dependencies
   Installing node modules (package.json + package-lock)

   > [email protected] install /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/phantomjs-prebuilt
   > node install.js

   PhantomJS not found on PATH
   Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
   Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
   Receiving...

   Received 22866K total.
   Extracting tar contents (via spawned process)
   Removing /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/phantomjs-prebuilt/lib/phantom
   Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1557749855763/phantomjs-2.1.1-linux-x86_64 -> /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/phantomjs-prebuilt/lib/phantom
   Writing location.js file
   Done. Phantomjs binary available at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs

   > [email protected] postinstall /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/circular-json
   > echo ''; echo "\x1B[1mCircularJSON\x1B[0m is in \x1B[4mmaintenance only\x1B[0m, \x1B[1mflatted\x1B[0m is its successor."; echo ''


   \x1B[1mCircularJSON\x1B[0m is in \x1B[4mmaintenance only\x1B[0m, \x1B[1mflatted\x1B[0m is its successor.

   added 556 packages from 901 contributors, removed 35 packages, updated 32 packages and audited 3356 packages in 22.421s
   found 15 vulnerabilities (3 low, 6 moderate, 6 high)
     run `npm audit fix` to fix them, or `npm audit` for details

   Build
   Running build

   > [email protected] build /tmp/build_8f4fed8983ed393789cb313224c46f98
   > grunt build

   Running "requirejs:build_api" (requirejs) task
   >> Error: ENOENT: no such file or directory, open
   >> './bower_components/webrtc-adapter/release/adapter.js'
   >> In module tree:
   >>     easyrtc_app
   >>       easyrtc
   Warning: RequireJS failed. Used --force, continuing.
   [Error: Error: ENOENT: no such file or directory, open './bower_components/webrtc-adapter/release/adapter.js'
   In module tree:
       easyrtc_app
         easyrtc

     at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:28332:19
     at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3059:39
     at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:2999:25
     at Function.prim.nextTick (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:28083:9)
     at Object.errback (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:2998:26)
     at Object.callback (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:2984:23)
     at Object.then (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3038:23)
     at build (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:28289:12)
     at runBuild (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:30302:17)
     at Object.execCb (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1946:33)
     at Module.check (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1133:51)
     at Module.<anonymous> (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1389:34)
     at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:384:23
     at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1439:21
     at each (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:309:31)
     at Module.emit (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1438:17)
     at Module.check (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1188:30)
     at Module.enable (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1426:22)
     at Module.init (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1038:26)
     at Module.<anonymous> (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1264:30)
     at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:384:23
     at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:2697:17
     at Object.execCb (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1946:33)
     at Module.check (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1133:51)
     at Module.enable (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1426:22)
     at Module.init (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1038:26)
     at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1710:36
     at processTicksAndRejections (internal/process/task_queues.js:82:9)
   ] {
     originalError: [Error: ENOENT: no such file or directory, open './bower_components/webrtc-adapter/release/adapter.js'
       at Object.openSync (fs.js:436:3)
       at Object.readFileSync (fs.js:336:35)
       at Object.readFile (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3658:27)
       at Object.readFileAsync (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3672:32)
       at Function.require._cacheReadAsync (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:28102:25)
       at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:27671:48
       at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3041:37
       at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:2989:25
       at Function.prim.nextTick (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:28083:9)
npm ERR!           at Object.callback (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:2988:26)
 code ELIFECYCLE
npm ERR! errno 1
           at Object.then (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3038:23)
           at Object.start (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3031:34)
           at Object.context.load (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:27655:32)
           at Module.load (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1084:29)
npm ERR! [email protected] build: `grunt build`
npm ERR! Exit status 1
npm            at Module.fetch (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1074:66)
ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
           at Module.check (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1106:30)
           at Module.enable (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1426:22)
           at Object.enable (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1807:39)
           at Object.context.enable (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:27620:38)
           at Module.<anonymous> (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1411:33)
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:384:23
           at each (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:309:31)
           at Module.enable (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1363:17)
           at Module.init (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1038:26)
           at Module.moduleProto.init (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:27807:36)
           at callGetModule (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1453:63)
           at Object.completeLoad (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1840:21)
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:27756:41
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3041:37
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:2989:25
           at Function.prim.nextTick (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:28083:9)
           at Object.callback (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:2988:26)
           at Object.then (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3038:23)
           at Object.context.load (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:27735:28)
           at Module.load (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1084:29)
           at Module.fetch (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1074:66)
           at Module.check (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1106:30)
           at Module.enable (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1426:22)
           at Object.enable (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1807:39)
           at Object.context.enable (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:27620:38)
           at Module.<anonymous> (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1411:33)
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:384:23
           at each (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:309:31)
           at Module.enable (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1363:17)
           at Module.init (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1038:26)
           at Module.moduleProto.init (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:27807:36)
           at callGetModule (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1453:63)
           at Object.completeLoad (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1840:21)
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:27756:41
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3041:37
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:2989:25
           at Function.prim.nextTick (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:28083:9)
           at Object.callback (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:2988:26)
           at Object.then (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3038:23)
           at Object.context.load (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:27735:28)
           at Module.load (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1084:29)
           at Module.fetch (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1074:66)
           at Module.check (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1106:30)
           at Module.enable (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1426:22)
           at Object.enable (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1807:39)
           at Object.context.enable (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:27620:38)
           at Module.<anonymous> (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1411:33)
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:384:23
           at each (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:309:31)
npm            at Module.enable (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1363:17)
ERR!           at Module.init (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1038:26)
           at Module.moduleProto.init (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:27807:36)
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1710:36
           at Object.context.nextTick (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:27544:21)
           at Object.localRequire [as require] (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1699:29)
           at requirejs (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:2047:24)
           at Function.build.traceDependencies (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:29756:9)
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:28518:38
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3092:24
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3041:37
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:2989:25
           at Function.prim.nextTick (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:28083:9)
           at Object.callback (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:2988:26)
           at Object.then (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3038:23)
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3091:29
           at each (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:2951:21)
           at Function.prim.serial (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3090:9)
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:28525:29
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3041:37
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:2989:25
           at Function.prim.nextTick (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:28083:9)
           at Object.callback (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:2988:26)
           at Object.then (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3038:23)
           at Function.build._run (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:28507:12)
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:28288:26
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3041:37
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:2989:25
 A complete log of this run can be found in:
npm           at Function.prim.nextTick (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:28083:9)
 ERR!           at Object.callback (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:2988:26)
           at Object.then (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3038:23)
     /tmp/npmcache.XD0ZP/_logs/2019-05-13T12_17_41_710Z-debug.log
           at Object.start (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:3031:34)
           at build (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:28265:23)
           at runBuild (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:30302:17)
           at Object.execCb (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1946:33)
           at Module.check (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1133:51)
           at Module.<anonymous> (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1389:34)
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:384:23
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1439:21
           at each (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:309:31)
           at Module.emit (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1438:17)
           at Module.check (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1188:30)
           at Module.enable (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1426:22)
           at Module.init (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1038:26)
           at Module.<anonymous> (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1264:30)
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:384:23
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:2697:17
           at Object.execCb (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1946:33)
           at Module.check (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1133:51)
           at Module.enable (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1426:22)
           at Module.init (/tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1038:26)
           at /tmp/build_8f4fed8983ed393789cb313224c46f98/node_modules/requirejs/bin/r.js:1710:36
           at processTicksAndRejections (internal/process/task_queues.js:82:9)
         ] {
           errno: -2,
           syscall: 'open',
           code: 'ENOENT',
           path: './bower_components/webrtc-adapter/release/adapter.js',
           fileName: './bower_components/webrtc-adapter/release/adapter.js',
           moduleTree: [ 'easyrtc', 'easyrtc_app' ]
         }
       }
   Execution Time (2019-05-13 12:17:40 UTC-0)
   loading tasks        603ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 67%
   requirejs:build_api  294ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 33%
   Total 898ms

   Build failed

   We're sorry this build is failing! You can troubleshoot common issues here:
   https://devcenter.heroku.com/articles/troubleshooting-node-deploys

   Some possible problems:

   - Dangerous semver range (>) in engines.node
     https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version

   Love,
   Heroku

!推送被拒绝,无法编译Node.js应用。!推送失败

node.js heroku webrtc easyrtc
1个回答
0
投票

之所以失败,是因为它找不到所需的webRTC垫片适配器组件。您是否通过Bower安装了它?如果不是,请使用bower install webrtc-adapter

如果已经做过,是否有.gitignore文件不包含在.bower_components文件夹中?

© www.soinside.com 2019 - 2024. All rights reserved.