Closed yq314 closed 4 years ago
Hi, I am sorry for late response. This is an error generated by the AMF parser. This just means that parser cannot parse the API file. Is it possible that pats are set incorrectly?
You can pass --verbose
option to generate a lot of output that may help with debug.
Hi, @jarrodek thanks for the reply.
The same API file compiles fine on my Mac so I don't think it's a problem. It only fails in the docker environment based on node:lts-alpine
, and the output is already verbose...
It generates a lot of debug logs but it's all fine until the AMF step and the error message is simply undefined
... I'm not familiar with AMF, is there a way to debug into AMF to see what is happening?
I've tried node:lts
, node:lts-slim
and node:lts-alpine
all getting the same error
I'm seeing a few warnings in the verbose log, not sure if that matters:
npm WARN deprecated bower@1.8.8: We don't recommend using Bower for new projects. Please consider Yarn and Webpack or Parcel. You can read how to migrate legacy project here: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
npm WARN deprecated sw-precache@5.2.1: Please migrate to Workbox: https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
npm WARN deprecated sw-toolbox@3.6.0: Please migrate to Workbox: https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
/usr/local/bin/api-console -> /usr/local/lib/node_modules/api-console-cli/bin/api-console-cli.js
> core-js@2.6.9 postinstall /usr/local/lib/node_modules/api-console-cli/node_modules/core-js
> node scripts/postinstall || echo "ignore"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: google-closure-compiler-osx@20181008.0.0 (node_modules/api-console-cli/node_modules/google-closure-compiler-osx):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for google-closure-compiler-osx@20181008.0.0: wanted {"os":"darwin","arch":"x64,x86"} (current: {"os":"linux","arch":"x64"})
Hi, This warning messages are unrelated. I am not really sure what is happening and why. It must be related to AMF library. I will try to reproduce this in a container and see what is happening.
Has the source of the issue been discovered? I'm encountering the same exact error when I run 'NODE_OPTIONS=--max_old_space_size=4096 api-console build -t "RAML 1.0" --verbose -a ../../../raml/third-party/v1/transaction.raml'.
As a side note... dt2js and raml2html have no problems parsing the files and generating the correct results.
Could #35 be the reason for this issue? Have you tried -a without any "../" ?
The version 2.0.0 now has completely different build process where this issue is not detected anymore.
I'm trying to build api-console in docker, based on
node:lts-alpine
but it failed with this error of no much use:My Dockerfile is as simple as this:
Appreciate if anyone could point me to where I can debug further?