Forum Discussion

miikka's avatar
miikka
Maven
9 years ago

[SDK] Error while creating a project

When running the command of 'li create-project' for creating a local repository and to connect to our development site (15.10), I'm getting this error:

Invalid response from server. Check your server url and version.
/usr/local/lib/node_modules/lithium-sdk/lib/version-check.js:77
            throw error;
            ^

Error: Invalid response from server. Check your server url and version.
    at parseResponse (/usr/local/lib/node_modules/lithium-sdk/lib/version-check.js:94:13)
    at Request._callback (/usr/local/lib/node_modules/lithium-sdk/lib/version-check.js:31:17)
    at Request.self.callback (/usr/local/lib/node_modules/lithium-sdk/node_modules/request/request.js:199:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (/usr/local/lib/node_modules/lithium-sdk/node_modules/request/request.js:1160:14)
    at emitOne (events.js:82:20)
    at Request.emit (events.js:169:7)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/lithium-sdk/node_modules/request/request.js:1111:12)
    at emitNone (events.js:72:20)

 

Interestingly enough, this happens on the same computers (Mac and Windows 10) from where I can connect and export plugins from our stage instance without problems now. I'm running the version 1.0.0 of the SDK, node v.4.2.1 and npm v.2.14.7

 

I have created an upload token and am using that when running the create-project command.

  • DougS's avatar
    DougS
    Khoros Oracle

    It looks like there is an issue with running the SDK install on the version of NPM you are on. I tried it last week and ran into the same issue you did.  I upgraded node.js to version 4.2.2 (which was the latest node.js "mature" version at the time) and then re-installed gulp and the SDK and everything worked fine for me again. Can you try upgrading node.js to to the latests 4.X.X version (looks like that version is 4.2.3 as of this post, but it was 4.2.2 last week when I tested this), then re-install gulp and the lithium-sdk modules:

     

    npm install gulp -g
    npm install lithium-sdk -g

     

    Thanks,

     

    -Doug

    • miikka's avatar
      miikka
      Maven

      Thanks Doug.

       

      On Mac I actually already had node version 4.2.2 but was still getting the error. On Windows I now upgraded to 4.2.2, re-installed both gulp and lithium-sdk and am still getting the same error when trying to create a project against our responsive dev site. Interestingly enough, when doing the same against our stage environment, project creation works. So the issue could be related to our responsive dev site.

       

      I see that there's 1.0.1 version of lithium-sdk available so will upgrade to that one and then try again.

      • DougS's avatar
        DougS
        Khoros Oracle

        I am having trouble reproducing the issue on my mac. I was just able to create a project using your responsive stage site on my mac. Here are the details (with path names and hostnames changed of course):

         

        LT3349:lia my.username$ node -v
        v4.2.2
        LT3349:lia my.username$ npm -v
        2.14.7
        LT3349:lia my.username$ npm ls -g lithium-sdk --depth=0
        /Users/my.username/.nvm/versions/node/v4.2.2/lib
        └── lithium-sdk@1.0.1

        LT3349:lia my.username$ li create-project
        ? What is your repository name?
        Only lower case characters, numbers or hyphens (-) are allowed. myresponsivestageproject
        ? What is the URL (include port if exists) to the dev/stage site that you will connect to (beginning with "https://")? https://yourresponsivesite.lithium.com
        ? Do you have a plugin token (if not press enter)? xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/.gitignore
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/README.md
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/package.json
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/gulpfile.js
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res [DIR]
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/sdk.conf.json
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/template.server.conf.json
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/web [DIR]
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/components [DIR]
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/controllers [DIR]
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/endpoints [DIR]
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/init [DIR]
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/lang [DIR]
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/layouts [DIR]
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/macros [DIR]
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/quilts [DIR]
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/skins [DIR]
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/web/README.md
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/web/html [DIR]
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/components/README.md
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/controllers/README.md
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/endpoints/README.md
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/init/README.md
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/lang/README.md
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/layouts/README.md
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/macros/README.md
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/quilts/README.md
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/quilts/custom [DIR]
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/skins/README.md
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/web/html/assets [DIR]
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/web/html/badge_icons [DIR]
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/web/html/rank_icons [DIR]
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/web/html/survey_icons [DIR]
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/res/quilts/custom/README.md
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/web/html/assets/README.md
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/web/html/badge_icons/README.md
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/web/html/rank_icons/README.md
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/web/html/survey_icons/README.md
        [10:11:51] /Users/my.username/lisdk/myresponsivestageproject/server.conf.json
        [10:11:51] Starting: npm link lithium-sdk
        /Users/my.username/lisdk/myresponsivestageproject/node_modules/lithium-sdk -> /Users/my.username/.nvm/versions/node/v4.2.2/lib/node_modules/lithium-sdk
        [10:11:51] Finished: npm link lithium-sdk
        [10:11:51] Starting: npm link gulp
        /Users/my.username/lisdk/myresponsivestageproject/node_modules/gulp -> /Users/my.username/.nvm/versions/node/v4.2.2/lib/node_modules/gulp
        [10:11:52] Finished: npm link gulp
        [10:11:52] Starting: npm install
        npm WARN package.json myresponsivestageproject@ No license field.
        [10:11:57] Finished: npm install
        [10:11:57] Created myresponsivestageproject

         Let me try on a Windows machine and see if I can't reproduce the problem there.

         

        -Doug