> [email protected] install /usr/lib/node_modules/@asyncapi/generator/node_modules/re2
> install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR
Trying https://github.com/uhop/node-re2/releases/download/1.15.4/linux-x64-83.br ...
Writing to build/Release/re2.node ...
Trying https://github.com/uhop/node-re2/releases/download/1.15.4/linux-x64-83.gz ...
Writing to build/Release/re2.node ...
Building locally ...
npm ERR! code EACCES
npm ERR! syscall scandir
npm ERR! path /root/.npm/_logs
npm ERR! errno -13
npm ERR!
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR!
npm ERR! To permanently fix this problem, please run:
npm ERR! sudo chown -R 65534:0 "/root/.npm"
glob error [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {
errno: -13,
code: 'EACCES',
syscall: 'scandir',
path: '/root/.npm/_logs'
}
> [email protected] rebuild /usr/lib/node_modules/@asyncapi/generator/node_modules/re2
> node-gyp rebuild
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/14.5.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/@asyncapi/generator/node_modules/re2/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/@asyncapi/generator/node_modules/re2/.node-gyp'
gyp ERR! System Linux 4.4.0-185-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/@asyncapi/generator/node_modules/re2
gyp ERR! node -v v14.5.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] rebuild: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
(node:2706) UnhandledPromiseRejectionWarning: 243
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2706) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:2706) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejectionsthat are not handled will terminate the Node.js process with a non-zero exit code.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/@asyncapi/generator/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ @asyncapi/[email protected]
added 249 packages from 170 contributors in 21.417s
$ npm install -g @asyncapi/generator
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
/usr/bin/asyncapi-generator -> /usr/lib/node_modules/@asyncapi/generator/cli.js
/usr/bin/ag -> /usr/lib/node_modules/@asyncapi/generator/cli.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/@asyncapi/generator/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ @asyncapi/[email protected]
updated 1 package in 7.166s
ag asyncapi.yaml @asyncapi/nodejs-template -o output -p server=mosquitto
internal/modules/cjs/loader.js:1033
throw err;
^
Error: Cannot find module './build/Release/re2'
Require stack:
- /usr/lib/node_modules/@asyncapi/generator/node_modules/re2/re2.js
- /usr/lib/node_modules/@asyncapi/generator/node_modules/@asyncapi/parser/lib/utils.js
- /usr/lib/node_modules/@asyncapi/generator/node_modules/@asyncapi/parser/lib/customValidators.js
- /usr/lib/node_modules/@asyncapi/generator/node_modules/@asyncapi/parser/lib/parser.js
- /usr/lib/node_modules/@asyncapi/generator/node_modules/@asyncapi/parser/lib/index.js
- /usr/lib/node_modules/@asyncapi/generator/lib/generator.js
- /usr/lib/node_modules/@asyncapi/generator/cli.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
at Function.Module._load (internal/modules/cjs/loader.js:899:27)
at Module.require (internal/modules/cjs/loader.js:1090:19)
at require (internal/modules/cjs/helpers.js:75:18)
at Object.<anonymous> (/usr/lib/node_modules/@asyncapi/generator/node_modules/re2/re2.js:3:13)
at Module._compile (internal/modules/cjs/loader.js:1201:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
at Module.load (internal/modules/cjs/loader.js:1050:32)
at Function.Module._load (internal/modules/cjs/loader.js:938:14)
at Module.require (internal/modules/cjs/loader.js:1090:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/usr/lib/node_modules/@asyncapi/generator/node_modules/re2/re2.js',
'/usr/lib/node_modules/@asyncapi/generator/node_modules/@asyncapi/parser/lib/utils.js',
'/usr/lib/node_modules/@asyncapi/generator/node_modules/@asyncapi/parser/lib/customValidators.js',
'/usr/lib/node_modules/@asyncapi/generator/node_modules/@asyncapi/parser/lib/parser.js',
'/usr/lib/node_modules/@asyncapi/generator/node_modules/@asyncapi/parser/lib/index.js',
'/usr/lib/node_modules/@asyncapi/generator/lib/generator.js',
'/usr/lib/node_modules/@asyncapi/generator/cli.js'
]
}
sudo chown -R 65534:0 "/root/.npm" /usr/lib/node_modules/@asyncapi/generator/node_modules/re2
Then rerunning the install step tutorial (step 2.1) resolves the error messages noted above for that step. But unfortunately step 2.2 of the tutorial still doesn't work.