Forum Discussion

allensmith81's avatar
8 months ago

Aurora SDK install via NPM

LarryI 

Was excited to see the new SDK via NPM but I hit some problems I wanted to share with you.

The documentation says you support NodeJS 16 and 17. With Node 17.9.1 installed you get errors when you try to install the sdk, specifically:

 

 

sudo npm install khoros-aurora-sdk --no-fund
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/eslint-plugin@6.8.0',
npm WARN EBADENGINE   required: { node: '^16.0.0 || >=18.0.0' },
npm WARN EBADENGINE   current: { node: 'v17.9.1', npm: '8.11.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/parser@6.8.0',
npm WARN EBADENGINE   required: { node: '^16.0.0 || >=18.0.0' },
npm WARN EBADENGINE   current: { node: 'v17.9.1', npm: '8.11.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/scope-manager@6.8.0',
npm WARN EBADENGINE   required: { node: '^16.0.0 || >=18.0.0' },
npm WARN EBADENGINE   current: { node: 'v17.9.1', npm: '8.11.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/type-utils@6.8.0',
npm WARN EBADENGINE   required: { node: '^16.0.0 || >=18.0.0' },
npm WARN EBADENGINE   current: { node: 'v17.9.1', npm: '8.11.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/types@6.8.0',
npm WARN EBADENGINE   required: { node: '^16.0.0 || >=18.0.0' },
npm WARN EBADENGINE   current: { node: 'v17.9.1', npm: '8.11.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/typescript-estree@6.8.0',
npm WARN EBADENGINE   required: { node: '^16.0.0 || >=18.0.0' },
npm WARN EBADENGINE   current: { node: 'v17.9.1', npm: '8.11.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/utils@6.8.0',
npm WARN EBADENGINE   required: { node: '^16.0.0 || >=18.0.0' },
npm WARN EBADENGINE   current: { node: 'v17.9.1', npm: '8.11.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/visitor-keys@6.8.0',
npm WARN EBADENGINE   required: { node: '^16.0.0 || >=18.0.0' },
npm WARN EBADENGINE   current: { node: 'v17.9.1', npm: '8.11.0' }
npm WARN EBADENGINE }

 

 

I had to drop back down to 16.20.2 to be able to successfully install the aurora SDK. 

When I run npm list I now get:

 

 

`-- khoros-aurora-sdk@24.5.0-rc.0

 

 

 

Ok so fixed but looks like node 17 isn't supported.

Next problem, it tells me to clone the repo from git, which I do. It then tells me to find .env.local file and edit it in a text editor. I have checked that hidden files are visible in file explorer but there is no file called .env.local..

 

What am I missing?

The only files in the cloned repo are: 

1. a directory called res which contains sub-directories [components,props,quilts,texts,themes]

2. a file called README.md

 

10 Replies

  • MattV's avatar
    MattV
    Khoros Staff
    8 months ago

    Hopefully I don't step on Larry's toes too much.

    I believe the SDK version should match your community version. You can check your community version at /t5/s/status/version. 

    You can check available sdk versions with npm show khoros-aurora-sdk versions

    However, the earliest version of SDK is 24.4, and since Community 24.4 was just released, your community might not have been upgraded yet. 

    I think there are also some other supporting files that are intended to be added to all Aurora Community git repos, but product might not have gotten to them all yet.

    In the event your .env.local file is missing, this is what it should look like:

    # the full URL to the LIA instance (i.e. https://foo.bar.com)
    LIA_URL=
    # the developer's SDK Key (found in the Dev Tools tab of the community admin app)
    SDK_KEY=

     

  • allensmith81's avatar
    allensmith81
    Boss
    8 months ago

     

    saikumarn 

    Your right I am, because the installing the SDK documentation doesn't tell you thats where the file is 🙂

     

    Indeed I would go so far to say it actually tells you to clone the git repo and then in this directory find the env.local file !

    Clone your community's plugin repository from GitHub into a local directory (for example, ~/development/plugin/exampleco)
    Locate the file named .env.local in this directory. If you don't see it, note that the file may be hidden by default by your OS (Mac, Windows).


    I actually have no idea where the sdk files are, any ideas? If you can provide guidance that would be helpful but I think this should be in the documentation 🙂

     

  • MattV 

    Thanks Matt - that makes allot of sense to me! 

     

    I think I am just trying to make sure I give feedback here to help make watertight documentation.

    So maybe we should put a line in the 'Installing the SDK' documentation that says "You must make sure you are using an SDK version that is at least the same or lower than your community version" unless you plan to release a new SDK with each version?

    I also think we need to check the 'Node 16 and 17' are supported statement because 24.4 won't install on 17.

    Also since node is up to like what 22, will the Khoros SDK keep up with newer versions of node?

  • allensmith81 After running 'npm i khoros-aurora-sdk,' it generating the 'node_modules' folder. I think we need to add the .env file to 'node_modules/khoros-aurora-sdk' folder.

  • RyanPi's avatar
    RyanPi
    Khoros Staff
    8 months ago

    There is a callout in the guide that if you don't see a .env.local file, and it isn't hidden by default, you should create it. I'll try to make that step more clear in the documentation.

    As for the other errors you're seeing, I'll keep an eye on this thread and update documentation with any new information.

  • allensmith81's avatar
    allensmith81
    Boss
    7 months ago

    RyanPi I did find a file in the node_modules\khoros-aurora-sdk\templates called .env.local.tmpl

    Should I copy that file and edit it as needed? Also where does the .env.local file need to live exactly

  • MattV's avatar
    MattV
    Khoros Staff
    7 months ago

    allensmith81 wrote:

    RyanPi I did find a file in the node_modules\khoros-aurora-sdk\templates called .env.local.tmpl

    Should I copy that file and edit it as needed? Also where does the .env.local file need to live exactly


    You could copy that file.

    I want to say you can actually probably copy all those files, and just remove "tmpl".

    They should all live at the root of your repo.

    Product will be doing this for all communities sooner rather than later. So these setup steps would only be if you really can't wait.