Smart UI install fails while trying to contact OpenText address

Options

Hi,

I'm trying to do a base installation of the Smart UI SDK. I downloaded the 20.4 SDK (the latest) and installed nodeJS v 11.15 (based on advice from others after trying with v14.16 and running into problems with running the yeoman installer - primordial error).

I got as far as where you unpack the SDK, CD into it and run npm install.

WHen I do that, after about 5 minutes, it comes back with this:

I checked and artifactory.opentext.net is indeed unreachable (assuming that it is even a real internet address - I thought opentext.net was reserved for internal addresses).

is it just that the repo for artifacts above is down temporarily or do I need a different package.lock.json (the file that explicitly mentions the aforementioned address)?

Thanks in advance.

-Hugh

Comments

  • Not sure if it will help you @Hugh Ferguson whet I did is since I didnt fully know how to downgrade

    I did this link https://stackoverflow.com/questions/55921442/how-to-fix-referenceerror-primordials-is-not-defined-in-node

    When today I look at my npm-shrinkwrap.json just like the OP says it originally had a few lines as in the article but now it has 4370 lines and plenty of hits for graceful-fs


    I then only did the first task in the SUI powerpoint says these lines


    I did not get any time pursuing the other things in the smartui PPT .Since that worked I guessed(could be a big wrong inference) at some point I will work on it.It will be good to know if @Ferdinand Prantl will give us some version guidance to everyone.

  • This probably won't help as I'm stuck at the step before you even install yeoman (which is where I ran into the original primordials error).

  • You should use Node.js LTS to avoid problems, because that is what we use in OT. If you encounter problems, switch to the LTS version from the time when the Smart UI version was in the development. It is Node.js 12 for Smart UI 20.4.

    I wonder if you see the same error with Node.js 12 and the (default) npm 6. Although the package lock was created with a different NPM registry, npm is supposed to use the registry from your environment. Otherwise location-based NPM proxies would not make sense. If you use npm 5, then you should definitely try Node.js 12 with npm 6. NPM 5 is known for the broken handling of the package lock. If it still does not help, delete package-lock.json and re-run npm i. The package lock is recommended for Node.js projects, but it is not important for the SDK.

    The Smart UI extension generator uses obsolete packages and I was able to get it working only with the following workaround:

    1. Switch to Node.js 10.
    2. Install yo globally and generator-csui-extension too, as it is documented.
    3. Run "yo csui-extension --no-install". This works only with Node.js 10. You need to prevent the NPM module installation. (If you do not, you can ignore the failed installation.)
    4. Switch to Node.js 12.
    5. Run "npm i". This would not succeed with Node.js 10.
    6. Install grunt-cli globally, if you have not done it yet.
    7. Run grunt. You will probably need to fix something. When I last did it, the freshly generated project was not buildable.

    I recommend you using nvm on non-Windows or nvm-windows on Windows to be able to switch among Node.js versions quickly.

    If you found this crazy, file a bug about this at the customer support, please.

  • Hi Ferdinand,

    A couple of things: 1) why am I getting an error for an opentext address? is artifactory.opentext.net supposed to be exposed to the internet or is it an internal only address?, 2) I would totally open up support tickets on this, but as a technology partner, I'm unable to do so. I can only open up tickets if the work is for a specific client (and this work is for 3rd party development).

    I'm a bit surprised you mentioned nodeJS 12 as that appears to be the version from which the original primordial error that Appu referenced above started. You have now told us that nodeJS was the LTS at the time 20.4 was released, but going forward, how will we know what version of nodeJS to deploy? Once again, would totally open a ticket if that were an option for partners.

    -Hugh

  • 1) I do not know. You should not be. Although artifactory.opentext.net (which is in OpenText intranet) is inside the package lock, npm is supposed to replace it with your global registry URL. But package lock did not work properly before npm 6.

    2) I did not know it. Well, it is how it is then.

    I got the primordial error when I used the csui-extension generator with Node.js newer than 10. Installing the npm dependencies in the generated project failed with Node.js 10 or older, because eslint needed newer syntax.

    Generally, the current LTS is the best bet. If it fails, then the previous one and so on. OpenText releases once and the release is supposed to be supported for 5 years. The Node.js ecosystem does not work like that. It leads to problems like this.

    I would have a single generator package constantly updated to work with the current LTS well and a specific version of CS Smart UI sources downloaded on demand. But we are not there today. I mentioned opening the support case because OpenText is strongly customer-driven and voices from outside boost the priority of the request.

  • Can anyone tell me what version of nodeJS was used to build 21.1? That's the version I'm trying now. It appears to have a lot of the same errors as the 20.4 version.

    -Hugh

  • Smart UI 21.1 was built with Node.js 12.

  • I was able to get it all to compile with nodeJS 11.15 and the 21.1 SDK. I installed nvm-windows as a precaution and preloaded node versions 12 and 10 just in case.

    -Hugh

  • Ugis
    Options

    Hello,

    It would be really nice if OT could create a simple "release note" document for each smart UI SDK release stating which versions of 3rd party components to use - for sdk, generator...

    Or at least update included "readme" files for each release with up-to-date information. Generator 20.4 mentions to use node 4 or newer - so basically node version between 2015 and 2021. SDK - node 8 or newer...

    Ugis

  • Ugis
    Options

    And just FYI, following version matrix was working for me for 20.4:

    nodejs: 12.22.1 (latest 12.x as of writing, i use choco: choco install nodejs --version=12.22.1)

    npm: 6.14.12 (installed together with nodejs)

    grunt: 1.4.12 (npm install -g grunt-cli)

    yo: 4.1.0 (npm install -g yo)

    python: 2.7.18 (is this required at all? choco install python 2)

    With this combination it was possible to perform npm start for SDK.

    yo csui-extension still failed with "primordials is not defined", but as @Appu Nair posted above, I was able to fix it using these instructions - created npm-shrinkwrap.json in generator folder with following contents:

    {
      "dependencies": {
        "graceful-fs": {
            "version": "4.2.2"
         }
      }
    }
    

    and then in the same generator folder run: npm install

    after that, yo csui-extension was working

  • I'd second Ugis comments / wishes here. We'd also greatly appreciate that information, and additionally something in the CS release notes themselves that document key changes in the Smart UI itself (e.g. looks like 21.2 introduces some changes I can only guess are related to FedRAMP....)

    Regards,

    David

  • If you install Smart UI SDK 21.2, make sure that you apply the patch below, which fixes the project generator.

    You should use the contemporary versions of Node.js (12 or 14) and Python (3) with the contemporary versions of the SDK. It is troublesome with older SDK versions, because the versions used at the time when the SDK was released may not be supported today any more.

    The Python and Git pre-requisites are optional, because some NPM modules used during the build of a Smart UI project may need them. The SDK 21.2 does not depend on any module, which would need Git and probably not on any module that would need a build from sources. But it is usually easier just to install them and not wait if npm i or grunt fails.

    The SDK 21.2 builds an output that can be loaded in CS 16.0 or later. I myself was still building a couple of prototypes using SDK 16.2.10 at times when we were using CS 21.1, because I already had the environment and I did not want to spend time with getting a newer version running. The trick is to know what extension points you need what were available for the particular CS version. The format and content of the out-release directory has not changed and we have not broken a public module yet.

    Content Server Smart View SDK 21.2 Patch 1 was released, accessible from Content Server Smart View SDK 21.2. The zip archives are supposed to be unpacked to the same directory as the original archives were unpacked to replace the original files. The patch archives contain patch.txt with the patch information. Then the original instructions should be followed.

  • I amanged to solve it as below:

    1) Delete "package-lock.json" from the "E:\dev\CS SDK\csui-sdk-22.1.0"

    2) in "cmd.exe" as "administrator" type: "npm i --legacy-peer-deps"

    3) in "cmd.exe" as "administrator" type: "npm ci --legacy-peer-deps"

    4) npm start

    5) open the URL "http://localhost:7777/sample-index.html"

  • @Hugh Ferguson

    if you found any solution, kindly let me know. i am also facing the same issue, while trying to get the artificats from "artifactory.opentext.net".

    Regards,

    srinath

  • @Hugh Ferguson

    if you found any solution, kindly let me know. i am also facing the same issue, while trying to get the artificats from "artifactory.opentext.net".

    Regards,

    srinath

  • @srinath42 did you apply the patch mentioned above ?