Skip to content

Instantly share code, notes, and snippets.

View stoefln's full-sized avatar

Stephan Petzl stoefln

View GitHub Profile
/**
* This script takes care of resolving and packaging dependencies of opencv
* For some reason they are not found in the opencv-build folder, but in /usr/shared...
* MacOS provides ways to tell libraries where to find dependencies, so what we do here is to
* 1. iterate all opencv libraries
* 2. for each of them check for dependencies in /usr/...
* 3. copy each of those dependencies to our opencv-build/../dependencies dir
* 4. tell the opencv libraries to look in the opencv-build/../dependencies dir instead of in /usr/...
* 5. go through all the libraries in opencv-build/../dependencies and check for even more dependencies, take care of them the same way (see steps 1-4)
* 6. again: go through all the libraries in opencv-build/../dependencies and check for even more dependencies, take care of them the same way (see steps 1-4)
const notifier = require('node-notifier')
notifier.notify({
title: 'Repeato Build',
message: 'Your build finished!'
})
Error: C:\Program Files\nodejs\node.exe exited with code 1
Output:
yarn install v1.16.0
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error output:
• electron-builder version=20.38.5
• loaded configuration file=package.json ("build" field)
• installing production dependencies platform=win32 arch=x64 appDir=C:\Users\steph\MoviePrint_v004\app
Error: C:\Program Files\nodejs\node.exe exited with code 1
Output:
yarn install v1.16.0
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
yarn cross-env DEBUG_PROD=true yarn build build.log
yarn run v1.16.0
$ C:\Users\steph\electron-react-boilerplate-opencv4nodejs\node_modules\.bin\cross-env DEBUG_PROD=true yarn build build.log
$ concurrently "yarn build-main" "yarn build-renderer" build.log
$ cross-env NODE_ENV=production webpack --config ./configs/webpack.config.renderer.prod.babel.js --colors
$ cross-env NODE_ENV=production webpack --config ./configs/webpack.config.main.prod.babel.js --colors
[2] build.log exited with code 0
[1] Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade caniuse-lite browserslist`
[0] Hash: 8273de904a639b1c5176
[0] Version: webpack 4.26.0
Uncaught Error: The specified module could not be found.
\\?\C:\Users\steph\AppData\Local\Temp\8b4c199c-3c7e-4ed5-a53e-a00355984acc.tmp.node
at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:166:20)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:740)
at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:180:18)
at Module.load (internal/modules/cjs/loader.js:620)
at tryModuleLoad (internal/modules/cjs/loader.js:559)
at Function.Module._load (internal/modules/cjs/loader.js:551)
at Module.require (internal/modules/cjs/loader.js:658)
at require (internal/modules/cjs/helpers.js:20)
@stoefln
stoefln / fix.js
Created May 27, 2019 09:59
Fix opencv4nodejs dependency issues with electron
/**
* This script takes care of resolving and packaging dependencies of opencv
* For some reason they are not found in the opencv-build folder, but in /usr/shared...
* MacOS provided ways to tell libraries where to find dependencies, so what we do here is to
* 1. iterate all opencv libraries
* 2. for each of them check for dependencies in /usr/...
* 3. copy each of those dependencies to our opencv-build/../dependencies dir
* 4. tell the opencv libraries to look in the opencv-build/../dependencies dir instead of in /usr/...
* 5. go through all the libraries in opencv-build/../dependencies and check for even more dependencies, take care of them the same way (see steps 1-4)
* 6. again: go through all the libraries in opencv-build/../dependencies and check for even more dependencies, take care of them the same way (see steps 1-4)
@stoefln
stoefln / DirectionsRoute.json
Created February 26, 2019 10:29
Test DirectionsRoute
{
"geometry":"gkg~mA{zsbCkCgE{m@vj@{Tsg@sNc`@gO_]~CsD",
"routeOptions":{
"baseUrl":"dumyUrllllll",
"user":"dummyUserrrrr",
"profile":"dummyProfile....",
"coordinates":[
],
"geometries":"dummyGeometries",
@stoefln
stoefln / graphhopper_response.json
Created February 18, 2019 17:10
Graphhopper 0.82 response. Origin of route: (41.406914, 2.156693) Destination: (41.403597, 2.175327)
{
"info":{
"copyrights":[
"Toursprung",
"OpenStreetMap contributors"
],
"took":11
},
"paths":[
{
@stoefln
stoefln / for_mapbox.json
Last active February 26, 2019 13:39
Graphhopper response converted to mapbox format. Origin of route: Lat/Lng: (41.406914, 2.156693) Destination: Lat/Lng: (41.403597, 2.175327)
{
"geometry":"{_h~mAcrsbCs]v[{Tsg@bmAwmA{Og^cQs]~wDgtDw[{m@zsB_zCvt@wcAbt@seAkiA_cB_X{^os@chAwt@{fAju@kdAwy@_oAfm@s{@",
"routeOptions":{
"baseUrl":"dumyUrllllll",
"user":"dummyUserrrrr",
"profile":"dummyProfile....",
"coordinates":[
],
"geometries":"dummyGeometries",