Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-3042

'NodeJS' workspaces conversion failed because unable to resolve theia plugins after migration to Dev Spaces 3.0.0

    XMLWordPrintable

Details

    • Hide
      Show
      x86_64 OCP 4.10 cluster deploy CRW 2.15.4 run 'nodejs' workspace migrate CRW 2.15.4 to DS 3.0.0 used doc --> https://docs.google.com/document/d/1ULhYihATldFQxznf7deSKBsHHmhtajdwG_E-MeRv3es/edit#heading=h.kzsjguxjvmh login to DS 3.0.0 convert 'nodejs' from v1 to v2 on Dashboard
    • Hide

      Replace `ms-vscode/node-debug2/latest` with `ms-vscode/js-debug/latest` in the devfile to use the updated plug-in in the registry, and to proceed with the conversion.

      Since conversion from v1 to v2 is impossible automatically, you will need to:

      • Attempt conversion. On failure, review the contents of the new v2 devfile in the devfile tab of the Dashboard.
      • Copy the output of the partial conversion to a new devfile.yaml in your repo
      • Replace `ms-vscode/node-debug2/latest` with `ms-vscode/js-debug/latest` in the devfile to use the updated plug-in in the registry
      • Commit that new v2 devfile to your Git repo
      • Return to the dashboard, and enter the URL of your Git repo, so that the v2 devfile can be loaded.
      Show
      Replace `ms-vscode/node-debug2/latest` with `ms-vscode/js-debug/latest` in the devfile to use the updated plug-in in the registry, and to proceed with the conversion. Since conversion from v1 to v2 is impossible automatically, you will need to: Attempt conversion. On failure, review the contents of the new v2 devfile in the devfile tab of the Dashboard. Copy the output of the partial conversion to a new devfile.yaml in your repo Replace `ms-vscode/node-debug2/latest` with `ms-vscode/js-debug/latest` in the devfile to use the updated plug-in in the registry Commit that new v2 devfile to your Git repo Return to the dashboard, and enter the URL of your Git repo, so that the v2 devfile can be loaded.
    • Hide
      = Conversion of {prod-prev-short} Node.js workspaces with `node-debug` and `node-debug2` plug-ins

      Currently, using the *Convert* button in the {prod-short} dashboard to convert a *Deprecated* Node.js workspace with the `node-debug` or `node-debug2` plug-in fails. The following error message is displayed:

      pass:[<!-- vale RedHat.TermsErrors = NO -->]

      *Workspace conversion failed. Failed to create a new workspace from the devfile, reason: Unable to resolve theia plugins ...*.

      pass:[<!-- vale RedHat.TermsErrors = YES -->]

      In {prod-short} {prod-ver}, the `node-debug` and `node-debug2` plug-ins have been updated to `js-debug`.

      .Workaround

      pass:[<!-- vale RedHat.Spelling = NO -->]

      . Edit the devfile in the editor in the dashboard page. If the editor in the dashboard page is disabled, copy the devfile contents to a new `devfile.yaml` file.
      . Edit your existing v1 devfile(s) to replace `ms-vscode/node-debug/latest` and `ms-vscode/node-debug2/latest` with `ms-vscode/js-debug/latest`.
      . Commit to a Git repository.
      . Start a new workspace from the edited devfile by using one of the following options:
      ** The factory URL, using the `?new` URL parameter for starting a duplicate workspace:
      +
      [source,subs="+quotes,+attributes,+macros"]
      ----
      pass:c,a,q[{prod-url}]#__<git_repository_url>__?new
      ----
      ** Go to menu:Dashboard[Create Workspace > Quick Add > Import from Git > Git Repo URL* Enter Git URL > Create & Open].
      Show
      = Conversion of {prod-prev-short} Node.js workspaces with `node-debug` and `node-debug2` plug-ins Currently, using the *Convert* button in the {prod-short} dashboard to convert a *Deprecated* Node.js workspace with the `node-debug` or `node-debug2` plug-in fails. The following error message is displayed: pass:[<!-- vale RedHat.TermsErrors = NO -->] *Workspace conversion failed. Failed to create a new workspace from the devfile, reason: Unable to resolve theia plugins ...*. pass:[<!-- vale RedHat.TermsErrors = YES -->] In {prod-short} {prod-ver}, the `node-debug` and `node-debug2` plug-ins have been updated to `js-debug`. .Workaround pass:[<!-- vale RedHat.Spelling = NO -->] . Edit the devfile in the editor in the dashboard page. If the editor in the dashboard page is disabled, copy the devfile contents to a new `devfile.yaml` file. . Edit your existing v1 devfile(s) to replace `ms-vscode/node-debug/latest` and `ms-vscode/node-debug2/latest` with `ms-vscode/js-debug/latest`. . Commit to a Git repository. . Start a new workspace from the edited devfile by using one of the following options: ** The factory URL, using the `?new` URL parameter for starting a duplicate workspace: + [source,subs="+quotes,+attributes,+macros"] ---- pass:c,a,q[{prod-url}]#__<git_repository_url>__?new ---- ** Go to menu:Dashboard[Create Workspace > Quick Add > Import from Git > Git Repo URL* Enter Git URL > Create & Open].
    • Documented as Known Issue

    Description

      • 'NodeJS' workspaces are converted failed after migrate to DS 3.0.0 RC-06-03:
      Failed to create a new workspace from the devfile, reason: Unable to resolve theia plugins: ms-vscode/node-debug2/latest is a mandatory plug-in but definition is not found on the plug-in registry. Aborting !
      

      'devfile.yaml' after migrate, before convert

      • nodejs-conf:
        apiVersion: 1.0.0
        metadata:
          name: nodejs-dpmd
        projects:
          - name: nodejs-web-app
            source:
              location: 'https://devfile-registry-openshift-workspaces.apps.ocp410-oshmara.crw-qe.com/resources/nodejs-nodejs-web-app-master.zip'
              type: zip
        components:
          - id: vscode/typescript-language-features/latest
            type: chePlugin
          - id: ms-vscode/node-debug2/latest
            type: chePlugin
          - mountSources: true
            endpoints:
              - name: nodejs
                port: 3000
            memoryLimit: 512Mi
            type: dockerimage
            alias: nodejs
            image: 'registry.redhat.io/codeready-workspaces/plugin-java8-rhel8@sha256:2a62b1a38012287fab26dd625b846420e8ae1604ec6f64d3518e9783ced72e85'
        commands:
          - name: 1. Run the web app (and download dependencies)
            actions:
              - workdir: '${CHE_PROJECTS_ROOT}/nodejs-web-app/app'
                type: exec
                command: npm install; nodemon app.js
                component: nodejs
          - name: 2. Download dependencies
            actions:
              - workdir: '${CHE_PROJECTS_ROOT}/nodejs-web-app/app'
                type: exec
                command: npm install
                component: nodejs
          - name: 3. Run the web app
            actions:
              - workdir: '${CHE_PROJECTS_ROOT}/nodejs-web-app/app'
                type: exec
                command: nodemon app.js
                component: nodejs
          - name: 4. Run the web app (debugging enabled)
            actions:
              - workdir: '${CHE_PROJECTS_ROOT}/nodejs-web-app/app'
                type: exec
                command: nodemon --inspect app.js
                component: nodejs
          - name: 5. Stop the web app
            actions:
              - type: exec
                command: 'node_server_pids=$(pgrep -fx ''.*nodemon (--inspect )?app.js'' | tr "\\n" " ") && echo "Stopping node server with PIDs: ${node_server_pids}" && kill -15 ${node_server_pids} &>/dev/null && echo ''Done.'''
                component: nodejs
          - name: Attach remote debugger
            actions:
              - referenceContent: |
                  {
                    "version": "0.2.0",
                    "configurations": [
                      {
                        "type": "node",
                        "request": "attach",
                        "name": "Attach to Remote",
                        "address": "localhost",
                        "port": 9229,
                        "localRoot": "${workspaceFolder}",
                        "remoteRoot": "${workspaceFolder}"
                      }
                    ]
                  }
                type: vscode-launch
        
        

         

      • nodejs:
      apiVersion: 1.0.0
      metadata:
        name: nodejs-dpmd
      projects:
        - name: nodejs-web-app
          source:
            location: 'https://devfile-registry-openshift-workspaces.apps.ocp410-oshmara.crw-qe.com/resources/nodejs-nodejs-web-app-master.zip'
            type: zip
      components:
        - id: vscode/typescript-language-features/latest
          type: chePlugin
        - id: ms-vscode/node-debug2/latest
          type: chePlugin
        - mountSources: true
          endpoints:
            - name: nodejs
              port: 3000
          memoryLimit: 512Mi
          type: dockerimage
          alias: nodejs
          image: 'registry.redhat.io/codeready-workspaces/plugin-java8-rhel8@sha256:2a62b1a38012287fab26dd625b846420e8ae1604ec6f64d3518e9783ced72e85'
      commands:
        - name: 1. Run the web app (and download dependencies)
          actions:
            - workdir: '${CHE_PROJECTS_ROOT}/nodejs-web-app/app'
              type: exec
              command: npm install; nodemon app.js
              component: nodejs
        - name: 2. Download dependencies
          actions:
            - workdir: '${CHE_PROJECTS_ROOT}/nodejs-web-app/app'
              type: exec
              command: npm install
              component: nodejs
        - name: 3. Run the web app
          actions:
            - workdir: '${CHE_PROJECTS_ROOT}/nodejs-web-app/app'
              type: exec
              command: nodemon app.js
              component: nodejs
        - name: 4. Run the web app (debugging enabled)
          actions:
            - workdir: '${CHE_PROJECTS_ROOT}/nodejs-web-app/app'
              type: exec
              command: nodemon --inspect app.js
              component: nodejs
        - name: 5. Stop the web app
          actions:
            - type: exec
              command: 'node_server_pids=$(pgrep -fx ''.*nodemon (--inspect )?app.js'' | tr "\\n" " ") && echo "Stopping node server with PIDs: ${node_server_pids}" && kill -15 ${node_server_pids} &>/dev/null && echo ''Done.'''
              component: nodejs
        - name: Attach remote debugger
          actions:
            - referenceContent: |
                {
                  "version": "0.2.0",
                  "configurations": [
                    {
                      "type": "node",
                      "request": "attach",
                      "name": "Attach to Remote",
                      "address": "localhost",
                      "port": 9229,
                      "localRoot": "${workspaceFolder}",
                      "remoteRoot": "${workspaceFolder}"
                    }
                  ]
                }
              type: vscode-launch
      
      

      Attachments

        Issue Links

          Activity

            People

              vsvydenk Valerii Svydenko
              oshmarai Shmaraiev Oleksandr
              Max Leonov Max Leonov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: