Error on mimik-edge-cli account get-edge-access-token step - edgeengine

Following this manual https://developer.mimik.com/development-setup/ i stuck on a step on step 4.  ➜  
mimik mimik-edge-cli account get-edge-access-token -t eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjV2RG45aF9LSHNxTkJZNVZubUxFd0VfUVNpQTkzZEYyN1FTQUVRdVl5T2sifQ.eyJzdWIiOiIyODczMjAwNzg1Mjk4MTY1NzYwIiwiZW1haWwiOiIyODczMjAwNzg1Mjk4MTY1NzYwQGV4YW1wbGUuY29tIiwiYXVkIjoiZGRmZmY0ODgtNDI0Ny00MWVmLTg0YTktNThiZDAxMGQ0Y2Q5IiwiZXhwIjoxNjM0MzMzODQxLCJpYXQiOjE2MzE3NDE4NDEsImlzcyI6Imh0dHBzOi8vbWlkLm1pbWlrMzYwLmNvbSJ9.gJAZKzRgd7QxCz-ICRoQBFAiYQvtgTzLWarhnwcH53F509iUtjtvVAdZIfnrJo4b6GBVTLJDuGghwrKk-GoppuZ66T3w-oZa-EhQ1BUTZPu49jUOium1sIR7WMSmK55UWqjr0Fsr4-4OlByHSjT4XOOiB7stLpjgDi7K8BmHIZJj1nQ-_6oi9PpVdHuQs4O0VK8ASl6wdCo_ZU5zynlA2fEve7oARW1H0r866TPc7_h5zgABnFb_RpSFyS4yQDNSoHt1E1QQ-aAr821YJoFfmoVZtBWTUvFyd_bMctt9_fZYGOvkwwoUrClFht-8okXY0m4GRWzltI4wope5lO6Bpg
"Error"
Node versions 
{
  npm: '6.14.15',
  ares: '1.17.2',
  brotli: '1.0.9',
  cldr: '39.0',
  icu: '69.1',
  llhttp: '2.1.3',
  modules: '83',
  napi: '8',
  nghttp2: '1.42.0',
  node: '14.17.6',
  openssl: '1.1.1l',
  tz: '2021a',
  unicode: '13.0',
  uv: '1.41.0',
  v8: '8.4.371.23-node.76',
  zlib: '1.2.11'
}
according to https://stackoverflow.com/questions/67566906/unable-to-get-the-edge-access-token
i double-checked copied ID Token and it is correct.
Platforms i used Osx and ARM. edgeEdgine is installed.
Thank you in advance. 

Ok - i got at answer - YOUR edgeEngine needs to be running!!!
Sorry.

Related

Visual Studio 2017: The command "gulp" exited with code 9009

Net App and my issue is when I hit Rebuild it throws an error: Visual Studio 2017: The command "gulp" exited with code 9009
Full log you can see [here][1]
The short story:
Everything worked fine until yesterday, where I was updating python from 2.x to python3.
After that my global variable $(PATH) became instead of C:\Program Files\nodejs => C:\python39\
I edited $(PATH) and put it again C:\Program Files\nodejs into my external tools:
https://i.imgur.com/HtQkAYW.png
I also add as second location of external tools my %AppData% folder for npm as you can see on the image above. I checked that folder and there is a gulp cmd file. So it should be recognizable.
However when I hit rebuild, I still have this error as I shown from my logs.
This is my package.json file:
{
"name": "testtest",
"version": "1.0.0",
"private": true,
"scripts": {
"css": "gulp"
},
"engines": {
"node": "5.9.1",
"npm": "3.7.3"
},
"devDependencies": {
"gulp": "^3.9.1",
"gulp-concat": "^2.6.0",
"gulp-htmlclean": "^2.7.22",
"gulp-less": "^3.1.0",
"gulp-minify-css": "^1.2.4",
"gulp-sourcemaps": "^2.3.0",
"gulp-uglify": "^2.1.2",
"gulp-util": "^3.0.7",
"merge-stream": "^1.0.0"
}
}
This is mine setup of npm version from cli:
{
gulp: '3.9.1',
npm: '6.14.6',
ares: '1.16.0',
brotli: '1.0.7',
cldr: '37.0',
http_parser: '2.9.3',
icu: '67.1',
llhttp: '2.1.2',
modules: '72',
napi: '6',
nghttp2: '1.41.0',
node: '12.18.4',
openssl: '1.1.1g',
tz: '2019c',
unicode: '13.0',
uv: '1.38.0',
v8: '7.8.279.23-node.39',
zlib: '1.2.11'
}
I tried different versions of nodejs (12.x.x and 10.x.x) I have same behavior.
[1]: https://pastebin.com/4srU2yB0

Strapi-provider-upload-cloudinary install but strapi says module no

I'm trying to switch from the AWS S3 upload provider to the cloudinary upload provider in Strapi. It worked great with the AWS S3 provider, but after install the cloudinary module the app will not start back up. Says the module is not found and to install strapi-provider-upload-cloudinary.
Cloudinary is in the package.json, it is in the node_modules folder.
Strapi 3.6.8 running in Docker with Postgres mount to a local volume /app:/srv/app
node 14.17 and npm 7
NPM list output excerpt
├─┬ strapi-provider-upload-cloudinary#3.6.8
│ ├─┬ cloudinary#1.26.3
│ │ ├── cloudinary-core#2.11.4
│ │ ├── core-js#3.6.5
│ │ ├── lodash#4.17.21 deduped
│ │ └── q#1.5.1
Package.json dependencies
"dependencies": {
"knex": "0.21.18",
"pg": "8.5.1",
"strapi": "3.6.8",
"strapi-admin": "3.6.8",
"strapi-connector-bookshelf": "3.6.8",
"strapi-plugin-ckeditor5": "^1.13.0",
"strapi-plugin-content-manager": "3.6.8",
"strapi-plugin-content-type-builder": "3.6.8",
"strapi-plugin-documentation": "3.6.8",
"strapi-plugin-email": "3.6.8",
"strapi-plugin-i18n": "3.6.8",
"strapi-plugin-upload": "3.6.8",
"strapi-plugin-users-permissions": "3.6.8",
"strapi-provider-upload-cloudinary": "^3.6.8",
"strapi-utils": "3.6.8"
},
Output from Docker
Starting your app...
[2021-09-02T16:32:04.223Z] error Error: Cannot find module 'strapi-provider-upload-cloudinary'
Require stack:
/srv/app/node_modules/strapi-plugin-upload/config/functions/bootstrap.js
/srv/app/node_modules/strapi/lib/load/require-file-parse.js
/srv/app/node_modules/strapi/lib/load/load-config-files.js
/srv/app/node_modules/strapi/lib/core/load-apis.js
/srv/app/node_modules/strapi/lib/core/load-modules.js
/srv/app/node_modules/strapi/lib/Strapi.js
/srv/app/node_modules/strapi/lib/index.js
/srv/app/node_modules/strapi/lib/commands/develop.js
/usr/local/share/.config/yarn/global/node_modules/strapi/bin/strapi.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at createProvider (/srv/app/node_modules/strapi-plugin-upload/config/functions/bootstrap.js:41:30)
at module.exports (/srv/app/node_modules/strapi-plugin-upload/config/functions/bootstrap.js:13:36)
at execLifecycle (/srv/app/node_modules/strapi/lib/Strapi.js:437:14)
at /srv/app/node_modules/strapi/lib/Strapi.js:447:16
at Array.map ()
at Strapi.runLifecyclesFunctions (/srv/app/node_modules/strapi/lib/Strapi.js:444:33)
at Strapi.load (/srv/app/node_modules/strapi/lib/Strapi.js:379:16)
at async Strapi.start (/srv/app/node_modules/strapi/lib/Strapi.js:196:9)
[2021-09-02T16:32:04.229Z] error bootstrap function in plugin "upload" failed
[2021-09-02T16:32:04.230Z] error Error: The provider package isn't installed. Please run npm install strapi-provider-upload-cloudinary
at createProvider (/srv/app/node_modules/strapi-plugin-upload/config/functions/bootstrap.js:54:11)
at module.exports (/srv/app/node_modules/strapi-plugin-upload/config/functions/bootstrap.js:13:36)
at execLifecycle (/srv/app/node_modules/strapi/lib/Strapi.js:437:14)
at /srv/app/node_modules/strapi/lib/Strapi.js:447:16
at Array.map (<anonymous>)
at Strapi.runLifecyclesFunctions (/srv/app/node_modules/strapi/lib/Strapi.js:444:33)
at Strapi.load (/srv/app/node_modules/strapi/lib/Strapi.js:379:16)
at async Strapi.start (/srv/app/node_modules/strapi/lib/Strapi.js:196:9)
You have to delete node_modules and reinstall them. Strapi image installs node modules only when node_modules folder missing. So if you added any dependency later that dependency will not be installed automatically.

Cannot find module '#angular/compiler' when runnig ng serve

I've updated the dependencies and since then, I've got this error message when run ng serve:
An unhandled exception occurred: Cannot find module '#angular/compiler'
Require stack:
I've tried already this solutions: Cannot find module '#angular/compiler'
But didn't work for me.
Also deleted node_modules, checkout the project again.
Is there something wrong in my dependencies or what can I do to get it running again?
This is my package.json:
{
"name": "wichteli",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --host 0.0.0.0 --disable-host-check",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"test:ci": "ng test --browsers ChromeHeadlessCI --code-coverage true --watch false",
"e2e:ci": "ng e2e --protractor-config=e2e/protractor-ci.conf.js",
"e2e": "ng e2e"
},
"private": true,
"devDependencies": {
"#angular-devkit/build-angular": "~12.0.1",
"#angular/compiler-cli": "~12.0.1",
"#types/jasmine": "~3.7.4",
"#types/node": "^15.6.0",
"codelyzer": "^6.0.2",
"jasmine-core": "~3.7.1",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.3.2",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.6.0",
"karma-spec-reporter": "0.0.32",
"protractor": "~7.0.0",
"puppeteer": "^9.1.1",
"ts-node": "~9.1.1",
"tslint": "~6.1.0",
"typescript": "~4.2.4"
}
}
npm version output:
{
npm: '7.11.2',
node: '12.18.1',
v8: '7.8.279.23-node.38',
uv: '1.38.0',
zlib: '1.2.11',
brotli: '1.0.7',
ares: '1.16.0',
modules: '72',
nghttp2: '1.41.0',
napi: '6',
llhttp: '2.0.4',
http_parser: '2.9.3',
openssl: '1.1.1g',
cldr: '37.0',
icu: '67.1',
tz: '2019c',
unicode: '13.0'
}
ng --version output:
Angular CLI: 12.0.1
Node: 12.18.1
Package Manager: npm 7.11.2
OS: win32 x64
Angular:
...
Package Version
------------------------------------------------------
#angular-devkit/architect 0.1200.1 (cli-only)
#angular-devkit/core 12.0.1 (cli-only)
#angular-devkit/schematics 12.0.1 (cli-only)
#schematics/angular 12.0.1 (cli-only)
I've found a solution.
First, check how to update:
https://update.angular.io/?l=2&v=12.0-12.0
Was updating from 12 to 13
After this, ng serve worked more or less with a few error messages that some dependencies couldn't be resolved like #angular/core
npm install #angular/core
and for all other findings
after this, all was working again

PM2 Start Appname Returning Error Cannot Find Modules in Ubuntu 18.04 LTS

This is my first nodejs app and when I try to run the app using PM2 then app start and immediately it's become to errored and pm2 logs showing this
/root/.pm2/logs/app-out.log last 15 lines:
/root/.pm2/logs/app-error.log last 15 lines:
1|app | at Module.load (module.js:565:32)
1|app | at tryModuleLoad (module.js:505:12)
1|app | at Function.Module._load (module.js:497:3)
1|app | at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js:28:21) code: 'MODULE_NOT_FOUND' }
1|app | { Error: Cannot find module 'express'
1|app | at Function.Module._resolveFilename (module.js:547:15)
1|app | at Module.Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:61:29)
1|app | at require (internal/module.js:11:18)
1|app | at Object.<anonymous> (/var/www/whatsclone/app.js:18:17)
1|app | at Module._compile (module.js:652:30)
1|app | at Object.Module._extensions..js (module.js:663:10)
1|app | at Module.load (module.js:565:32)
1|app | at tryModuleLoad (module.js:505:12)
1|app | at Function.Module._load (module.js:497:3)
1|app | at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js:28:21) code: 'MODULE_NOT_FOUND' }
I have tried sudo pm2 update | npm install | npm install express
1|app | { Error: Cannot find module 'lodash'
1|app | at Function.Module._resolveFilename (module.js:547:15)
1|app | at Module.Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:61:29)
1|app | at require (internal/module.js:11:18)
1|app | at Object.<anonymous> (/var/www/whatsclone/config/environment/index.js:11:11)
1|app | at Module._compile (module.js:652:30)
1|app | at Object.Module._extensions..js (module.js:663:10)
1|app | at Module.load (module.js:565:32)
1|app | at tryModuleLoad (module.js:505:12)
1|app | at Function.Module._load (module.js:497:3)
1|app | at Module.require (module.js:596:17) code: 'MODULE_NOT_FOUND' }
PM2 | App [app:1] exited with code [1] via signal [SIGINT]
PM2 | App [app:1] starting in -fork mode-
PM2 | App [app:1] online
Now the output looks like this after run npm install express
packagee.json is here
{
  "name": "whatsclone",
  "version": "1.0.0",
  "description": "restfull whatscloneAPI",
  "private": true,
  "scripts": {
    "start": "node ./bin/www",
    "test": "grunt test"
  },
  "main": "./bin/www",
  "keywords": [
    "whatsclone",
    "api",
    "chat",
    "call"
  ],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "grunt": "^1.0.4",
    "grunt-apidoc": "^0.11.0",
    "grunt-contrib-watch": "^1.1.0",
    "grunt-mocha-test": "^0.13.3",
    "grunt-nodemon": "^0.4.2",
    "mocha": "^6.2.2",
    "nodemon": "^2.0.1"
  },
  "dependencies": {
    "async": "^3.1.0",
    "basic-auth": "^2.0.1",
    "body-parser": "^1.19.0",
    "composable-middleware": "^0.3.0",
    "connect-mongo": "^3.2.0",
    "cookie-parser": "^1.4.4",
    "dotenv": "^8.2.0",
    "ejs": "^2.6.2",
    "express": "^4.17.1",
    "express-jwt": "^5.3.1",
    "express-session": "^1.17.0",
    "express-validator": "^5.3.1",
    "i18n": "^0.8.4",
    "jsonwebtoken": "^8.5.1",
    "lusca": "^1.6.1",
    "mongodb": "^3.3.5",
    "mongoose": "^5.7.13",
    "morgan": "^1.9.1",
    "mosca": "^2.8.3",
    "mqtt": "^3.0.0",
    "multer": "^1.4.2",
    "readdir": "0.1.0",
    "serve-favicon": "^2.5.0",
    "twilio": "^3.37.1",
    "underscore": "^1.9.1",
    "uuid": "^3.3.3"
  }
}
Nothing fixed for me. Tried many tutorials from the internet and from this forum. still, the problem exists please I'm asking some help to fix this
node -v
v8.10.0
npm -v
3.5.2

node querystring not defined in script only

I can use querystring in node 4.2.6 from a script, but I can from a node prompt. Here's some proof.
I have the following script:
$ cat test.js
console.log(process.versions)
console.log(querystring)
And I get an error when I run it:
$ node test.js
{ http_parser: '2.5.0',
node: '4.2.6',
v8: '4.5.103.35',
uv: '1.8.0',
zlib: '1.2.8',
ares: '1.10.1-DEV',
icu: '56.1',
modules: '46',
openssl: '1.0.2e' }
/path/to/file/test.js:2
console.log(querystring)
^
ReferenceError: querystring is not defined
at Object.<anonymous> (/path/to/file/test.js:2:13)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3
But if I go into node on the command line, I don't get the error.
$ node
> console.log(process.versions)
{ http_parser: '2.5.0',
node: '4.2.6',
v8: '4.5.103.35',
uv: '1.8.0',
zlib: '1.2.8',
ares: '1.10.1-DEV',
icu: '56.1',
modules: '46',
openssl: '1.0.2e' }
undefined
> console.log(querystring)
{ unescapeBuffer: [Function],
unescape: [Function],
escape: [Function],
encode: [Function],
stringify: [Function],
decode: [Function],
parse: [Function] }
undefined
The console.log() is just for proof--I can't use querystring at all in a script. What could be wrong?
The node REPL (what you get when just typing the executable name (node)) automatically loads built-in modules as globals as they are accessed by name as a convenience. This is mentioned in the documentation here.
For scripts that you load with node foo.js you will need to require() modules manually to pull in what you actually need. For the querystring module, you would just need to do:
var querystring = require('querystring');
There is no need to npm install querystring as the module is built-in to node.

Resources