easyRTC server works fine on localhost but when I deploy it on Heroku it cause build fail and gave this logs
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)
> phantomjs-prebuilt#2.1.16 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
> circular-json#0.5.7 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
> easyrtc#1.1.1-beta 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! easyrtc#1.1.1-beta 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 easyrtc#1.1.1-beta 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
! Push rejected, failed to compile Node.js app.
! Push failed
It's failing because it cannot find the webRTC shim adapter component needed. Did you install it via Bower? If not, do so with bower install webrtc-adapter.
If you already did, do you have a .gitignore file that is excluding your .bower_components folder?
Related
I am getting below error while trying to start a API
npm run build:dev
sv-work-from-home-skeleton#0.0.0 build:dev C:\Users\u063631\DairyForecast\dairyforecast_api
webpack --mode=development
webpack is watching the files…
C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\webpack\node_modules\mkdirp\lib\opts-arg.js:13
throw new TypeError('invalid options argument')
^
TypeError: invalid options argument
at optsArg (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\webpack\node_modules\mkdirp\lib\opts-arg.js:13:11)
at NodeOutputFileSystem.mkdirp (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\webpack\node_modules\mkdirp\index.js:11:10)
at C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\webpack\lib\Compiler.js:494:26
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1)
at AsyncSeriesHook.lazyCompileHook (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\tapable\lib\Hook.js:154:20)
at Compiler.emitAssets (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\webpack\lib\Compiler.js:491:19)
at onCompiled (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\webpack\lib\Watching.js:51:19)
at C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\webpack\lib\Compiler.js:681:15
at eval (eval at create (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\tapable\lib\HookCodeFactory.js:33:10), :20:1)
at C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\ts-loader\dist\after-compile.js:30:9
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\tapable\lib\HookCodeFactory.js:33:10), :16:1)
at AsyncSeriesHook.lazyCompileHook (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\tapable\lib\Hook.js:154:20)
at C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\webpack\lib\Compiler.js:678:31
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1)
at AsyncSeriesHook.lazyCompileHook (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\tapable\lib\Hook.js:154:20)
at C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\webpack\lib\Compilation.js:1423:35
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1)
at AsyncSeriesHook.lazyCompileHook (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\tapable\lib\Hook.js:154:20)
at C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\webpack\lib\Compilation.js:1414:32
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1)
at AsyncSeriesHook.lazyCompileHook (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\tapable\lib\Hook.js:154:20)
at C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\webpack\lib\Compilation.js:1409:36
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1)
at AsyncSeriesHook.lazyCompileHook (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\tapable\lib\Hook.js:154:20)
at C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\webpack\lib\Compilation.js:1405:32
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1)
at AsyncSeriesHook.lazyCompileHook (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\tapable\lib\Hook.js:154:20)
at Compilation.seal (C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\webpack\lib\Compilation.js:1342:27)
at C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\webpack\lib\Compiler.js:675:18
at C:\Users\u063631\DairyForecast\dairyforecast_api\node_modules\webpack\lib\Compilation.js:1261:4
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sv-work-from-home-skeleton#0.0.0 build:dev: webpack --mode=development
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sv-work-from-home-skeleton#0.0.0 build:dev 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! C:\Users\u063631\AppData\Roaming\npm-cache_logs\2022-11-09T13_30_11_402Z-debug.log
I also got below warning while doing npm install
npm WARN source-map-loader#4.0.0 requires a peer of webpack#^5.72.1 but none is installed. You must install peer dependencies yourself.
I get an error everytime I try to use bower even the bower command pop me an error
bower install bootstrap
C:\Users\laptop\AppData\Roaming\npm\node_modules\bower\lib\node_modules\configstore\node_modules\mkdirp\index.js:90
throw err0;
^
Error: EPERM: operation not permitted, mkdir 'C:\Users\laptop.config'
at Object.mkdirSync (node:fs:1334:3)
at sync (C:\Users\laptop\AppData\Roaming\npm\node_modules\bower\lib\node_modules\configstore\node_modules\mkdirp\index.js:71:13)
at Function.sync (C:\Users\laptop\AppData\Roaming\npm\node_modules\bower\lib\node_modules\configstore\node_modules\mkdirp\index.js:77:24)
at Configstore.get (C:\Users\laptop\AppData\Roaming\npm\node_modules\bower\lib\node_modules\configstore\index.js:39:13)
at new Configstore (C:\Users\laptop\AppData\Roaming\npm\node_modules\bower\lib\node_modules\configstore\index.js:28:45)
at readCachedConfig (C:\Users\laptop\AppData\Roaming\npm\node_modules\bower\lib\config.js:19:23)
at defaultConfig (C:\Users\laptop\AppData\Roaming\npm\node_modules\bower\lib\config.js:11:12)
at Object. (C:\Users\laptop\AppData\Roaming\npm\node_modules\bower\lib\index.js:16:32)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) {
errno: -4048,
syscall: 'mkdir',
code: 'EPERM',
path: 'C:\Users\laptop\.config'
}
Im trying to get a readble stream from youtube-dl-exec.
youtubedl(url, {
dumpSingleJson: true,
noWarnings: true,
audioFormat: 'mp3',
//audioQuality: 0,
noCheckCertificate: true,
preferFreeFormats: true,
youtubeSkipDashManifest: true,
referer: 'https://google.com'
})
.then(async output => {
let resource = createAudioResource(output); // output = YtResponse (JSON)
})
.catch(err => console.error(err));
output is typeof YtResponse (JSON with formats and urls, thumbnails etc.)
So with
let url = output.formats[0]?.url;
I can get an URL like
https://r1---sn-h0jelnez.googlevideo.com/videoplayback?expire=
But I can't stream this because it's not a readable stream..
So I tried to use youtube-dl library. But if I wan't to install it, i get this error:
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c npm run check && npm run download
npm ERR! > youtube-dl#3.5.0 check
npm ERR! > bin-version-check python '>=2'
npm ERR! Error: Invalid version range
npm ERR! at module.exports (C:\Users\Admin\Documents\Nodejs\LL-Bot-Musik\node_modules\bin-version-check\index.js:12:25)
npm ERR! at Object.<anonymous> (C:\Users\Admin\Documents\Nodejs\LL-Bot-Musik\node_modules\bin-version-check-cli\cli.js:29:1)
npm ERR! at Module._compile (node:internal/modules/cjs/loader:1101:14)
npm ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
npm ERR! at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
npm ERR! at node:internal/main/run_main_module:17:47
npm ERR! A complete log of this run can be found in:
Now I don't know what I can do..
I am developing simple DApps using Ethereum platform. And in this, I have used Mocha test framework but coming with this error. Please help...
E:\Tutorials\Blockchain\Practicle\Demo>npm run test
demo#1.0.0 test E:\Tutorials\Blockchain\Practicle\Demo
mocha
TypeError: Suite argument "title" must be a string. Received type "function"
at createInvalidArgumentTypeError (E:\Tutorials\Blockchain\Practicle\Demo\node_modules\mocha\lib\errors.js:158:13)
at new Suite (E:\Tutorials\Blockchain\Practicle\Demo\node_modules\mocha\lib\suite.js:45:15)
at Function.Suite.create (E:\Tutorials\Blockchain\Practicle\Demo\node_modules\mocha\lib\suite.js:26:17)
at Object.create (E:\Tutorials\Blockchain\Practicle\Demo\node_modules\mocha\lib\interfaces\common.js:128:27)
at context.describe.context.context (E:\Tutorials\Blockchain\Practicle\Demo\node_modules\mocha\lib\interfaces\bdd.js:42:27)
at Object.<anonymous> (E:\Tutorials\Blockchain\Practicle\Demo\test\inbox_test.js:13:1)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.exports.requireOrImport (E:\Tutorials\Blockchain\Practicle\Demo\node_modules\mocha\lib\esm-utils.js:20:12)
at Object.exports.loadFilesAsync (E:\Tutorials\Blockchain\Practicle\Demo\node_modules\mocha\lib\esm-utils.js:33:34)
at Mocha.loadFilesAsync (E:\Tutorials\Blockchain\Practicle\Demo\node_modules\mocha\lib\mocha.js:421:19)
at singleRun (E:\Tutorials\Blockchain\Practicle\Demo\node_modules\mocha\lib\cli\run-helpers.js:156:15)
at exports.runMocha (E:\Tutorials\Blockchain\Practicle\Demo\node_modules\mocha\lib\cli\run-helpers.js:225:10)
at Object.exports.handler (E:\Tutorials\Blockchain\Practicle\Demo\node_modules\mocha\lib\cli\run.js:366:11)
at E:\Tutorials\Blockchain\Practicle\Demo\node_modules\mocha\node_modules\yargs\lib\command.js:241:49
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! demo#1.0.0 test: `mocha`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the demo#1.0.0 test 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! C:\Users\Prabhakar's\AppData\Roaming\npm-cache\_logs\2020-06-21T05_32_41_476Z-debug.log
I got my answer. And I m posting it so that it can be helpful others...
Earlier I have defined my describe method as:
describe(() => {
it("can pass the test", () => {
console.log(accounts);
});
});
Error Image
and here direct function I have passed instead of going for tittle first that's why mocha wasn't able to make it and return with error :
Suite argument "title" must be a string. Received type "function"
But after giving my contract method it accepts it as a tittle
describe( 'inbox', () => {
it("can pass the test", () => {
console.log(accounts);
});
});
Final Image
I am facing windows not defined error while trying to configure my angluar2 application with angular-universal.
cli version is migrated from 1.7.4 -> 6.0.3
Below is the error i am getting.
E:\Personal\my_codes\dist\server.js:1721
*/},function(e,t,n){"use strict";n.r(t),n.d(t,"provideModuleMap",function(){return a}),n.d(t,"ModuleMapLoaderModule",function(){return s}),n.d(t,"MODULE_MAP",function(){return i}),n.d(t,"ModuleMapNgFactoryLoader",function(){return o});var r=n(0),i=new r.InjectionToken("MODULE_MAP"),o=function(){function e(e,t){this.compiler=e,this.moduleMap=t}return e.prototype.load=function(e){var t=this.compiler instanceof r.Compiler,n=this.moduleMap[e];if(!n)throw new Error(e+" did not exist in the MODULE_MAP");return t?this.loadFactory(n):this.loadAndCompile(n)},e.prototype.loadFactory=function(e){return new Promise(function(t){return t(e)})},e.prototype.loadAndCompile=function(e){return this.compiler.compileModuleAsync(e)},e.decorators=[{type:r.Injectable}],e.ctorParameters=function(){return[{type:r.Compiler},{type:void 0,decorators:[{type:r.Inject,args:[i]}]}]},e}();function a(e){return{provide:i,useValue:e}}var s=function(){function e(){}return e.withMap=functio
ReferenceError: window is not defined
at Object.<anonymous> (E:\Personal\my_codes\dist\server.js:1721:1147)
at n (E:\Personal\my_codes\dist\server.js:1:172)
at Object.<anonymous> (E:\Personal\my_codes\dist\server.js:2001:2400)
at n (E:\Personal\my_codes\dist\server.js:1:172)
at E:\Personal\my_codes\dist\server.js:1:579
at Object.<anonymous> (E:\Personal\my_codes\dist\server.js:1:590)
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)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! col-ui#0.0.0 serve:ssr: `node dist/server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the col-ui#0.0.0 serve:ssr script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Any suggestion on how i can resolve this will be really helpful.
Try to use domino , that will support many inconsistency in Angular SSR.
In server.ts
const domino = require('domino');
const win = domino.createWindow(template);
global['window'] = win;
global['document'] = win.document;
global['navigator'] = win.navigator;
global['CSS'] = undefined;