Forum Discussion

amargherio's avatar
7 years ago

[SDK] "package-plugin" and "submit-plugin" missing tests

I'm trying to get a new developer set up and running with our SDK - it's been smooth sailing so far, but whenever he tries to run li package-plugin or li submit-plugin, it fails during the plugin-verify task with the output seen below.

 

He's using Cygwin for his terminal on a Windows 7, 64-bit PC.

 

The output from li package-plugin is:

$ li package-plugin
[14:18:46] Loaded gulp tasks in: 1.66 s
[14:18:46] Using gulpfile C:\stash\comm-outreach\swa-sdk-plugin\gulpfile.js
[14:18:46] Starting 'plugin-build'...
[14:18:46] Starting 'clean-tmp'...
[14:18:46] Starting 'clean-plugin'...
[14:18:46] Starting 'clean-plugin-zip'...
[14:18:46] Finished 'clean-tmp' after 67 ms
[14:18:46] Finished 'clean-plugin-zip' after 19 ms
[14:18:46] Finished 'clean-plugin' after 84 ms
[14:18:46] Starting 'clean'...
[14:18:46] Finished 'clean' after 19 μs
[14:18:46] Starting 'plugin-build-res'...
[14:18:46] Starting 'plugin-build-web'...
[14:18:46] Starting 'plugin-git-version'...
[14:18:46] Finished 'plugin-git-version' after 45 μs
[14:18:46] Failed to sync files
[14:18:46] Finished 'plugin-build-res' after 63 ms
[14:18:46] Failed to sync files
[14:18:46] Finished 'plugin-build-web' after 49 ms
[14:18:46] Finished 'plugin-build' after 199 ms
[14:18:46] Starting 'plugin-verify'...
[14:18:46] Tested 0 tests, 0 passes, 0 failures: PASS
[14:18:46] Tested 0 tests, 0 passes, 0 failures: PASS
[14:18:46] ✗ FAIL: Missing 2 expected files: res, res/**
[14:18:46] Tested 1 tests, 0 passes, 1 failures: FAIL
[14:18:46] 'plugin-verify' errored after 22 ms
[14:18:46] [gulp] Error in plugin 'stream-sync': Errors
Error in plugin 'gulp-expect-file'
Failed 1 expectations

[14:18:46] Done compiling plugin: C:\stash\comm-outreach\swa-sdk-plugin\plugin

The permissions, as seen via ls -la are:

$ ls -la
total 650
drwxr-xr-x 1 e104142 1050513      0 May 22 14:18 .
drwxr-xr-x 1 e104142 1050513      0 May 15 15:49 ..
drwxr-xr-x 1 e104142 1050513      0 May 22 14:01 .git
-rw-r--r-- 1 e104142 1050513     68 May 15 14:39 .gitignore
-rw-r--r-- 1 e104142 1050513   1114 May 15 14:39 .stylelintrc
drwxr-xr-x 1 e104142 1050513      0 May 22 13:39 .vscode
-rw-r--r-- 1 e104142 1050513     60 May 15 14:39 gulpfile.js
drwxr-xr-x 1 e104142 1050513      0 May 15 15:58 node_modules
-rw-r--r-- 1 e104142 1050513    396 May 16 10:34 package.json
drwxr-xr-x 1 e104142 1050513      0 May 22 14:18 plugin
-rw-r--r-- 1 e104142 1050513   1541 May 15 14:39 README.md
drwxr-xr-x 1 e104142 1050513      0 May 15 14:39 res
-rw-r--r-- 1 e104142 1050513     43 May 15 14:39 sdk.conf.json
-rw-r--r-- 1 e104142 1050513    228 May 15 15:59 server.conf.json
-rw-r--r-- 1 e104142 1050513    192 May 15 14:39 template.server.conf.json
drwxr-xr-x 1 e104142 1050513      0 May 15 14:39 web
-rw-r--r-- 1 e104142 1050513 302091 May 16 10:34 yarn.lock

Any ideas on what might be missing that would cause his verify tasks to fail?

  • Can you please verify that rsync is installed? 

    If rsync is already installed, does it work if you run with sudo (or I guess the Cygwin equivalent)? If so, this would likely point to some kind of user permissions issue (not necessarily with the directory structure that's been checked out, but perhaps with the scripts that are being run).

8 Replies

  • amargherio The error says

     

    [14:18:46] ✗ FAIL: Missing 2 expected files: res, res/**

    do you have these in your folder structure, can be empty folders, but the "required" plugin structure looks like this:

     

     

    you can easily create it automatically by running

     

    li create-project

    and following the instructions...

  • amargherio, Sometimes Lithium SDK gives error on first time creating a project using command "li create-project" . On syncing files its gives error, but it will create all folders and directories in project.

    you have to inside the project directory name in CMD like

    cd sdk/projectname

    after this you can also use below command to export all files related to current project

    li export-studio-plugin

     it will ask for confirmation to download all files , press Y for confirmation.

  • luk, res/ and res/** do exist in his project structure - he got the SDK project from our Bitbucket repository and has all of the subfolders and files underneath res/.

    Parshant we've already created the SDK and performed the initial export - my coworker is pulling down the SDK from our Bitbucket repository and ran npm install to get all of his SDK project dependencies. He's made changes and is now attempting to push into our staging environment and getting the above error on each attempt.

  • luk's avatar
    luk
    Boss
    7 years ago

    amargherio what versio of node is he running, I had several times trouble with too old or new versions of node, the SDK seems quite picky there... otherwise I would ping DougS, he might have better insight in what could be wrong!

  • lukHe's running 8.11.1. I asked him to install that as I had issues with 10.0.0.

  • amargherio's avatar
    amargherio
    Helper
    7 years ago

    And I definitely forgot to throw a ping out for DougS. Any other suggestions or guesses would be outstanding.

  • AdamN's avatar
    AdamN
    Khoros Oracle
    7 years ago

    Can you please verify that rsync is installed? 

    If rsync is already installed, does it work if you run with sudo (or I guess the Cygwin equivalent)? If so, this would likely point to some kind of user permissions issue (not necessarily with the directory structure that's been checked out, but perhaps with the scripts that are being run).

  • amargherio's avatar
    amargherio
    Helper
    7 years ago

    AdamNit looks like a missing rsync was the trick. I've marked this as accepted and thank you for the prompt!