sasjs / cli

Command line interface for creating, compiling, and building SAS® projects
https://cli.sasjs.io
MIT License
37 stars 5 forks source link

streamWebFolder cannot be empty, null or undefined when streamWeb is true. #1234

Closed allanbowe closed 1 year ago

allanbowe commented 2 years ago

It seems that sasjs compile is not merging the streamConfig object. To reproduce, just run sasjs create myApp -t angular and replace the sasjsconfig with this:

{
  "$schema": "https://cli.sasjs.io/sasjsconfig-schema.json",
  "macroFolders": [
    "sasjs/macros"
  ],
  "serviceConfig": {
    "serviceFolders": [
      "sasjs/services/common",
      "sasjs/services/files"
    ],
    "initProgram": "sasjs/services/serviceinit.sas"
  },
  "streamConfig": {
    "streamLogo": "assets/angular-logo.png",
    "streamServiceName": "Angular",
    "streamWeb": false,
    "streamWebFolder": "web",
    "webSourcePath": "dist"
  },
  "defaultTarget": "server",
  "targets": [
    {
      "name": "server",
      "serverUrl": "",
      "serverType": "SASJS",
      "appLoc": "/Public/app/angular-seed-app",
      "streamConfig": {
        "streamWeb": true
      }
    }
  ]
}

Finally, run sasjs cb and you will see the following in the terminal:

ERROR Error reading target from configuration: Error parsing target: Invalid stream config: streamWebFolder cannot be empty, null or undefined when streamWeb is true.

sasjsbot commented 1 year ago

:tada: This issue has been resolved in version 3.20.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: