By the way, I forgot to test an absolute path before, and indeed,
using "/lib/docs.xqy" (or "/lib/docs") works.  But the relative one
should work as well, I believe.

Hope that helps,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/


On 5 April 2016 at 11:08, Florent Georges wrote:
> Just tried 8-0.5, still the same behaviour.  I don't have access to
> Discuss, I will try to find whether there is a better way to report it
> if Developer Discussion is not well suited.
>
> Regards,
>
> --
> Florent Georges
> http://fgeorges.org/
> http://h2oconsulting.be/
>
>
> On 5 April 2016 at 10:50, Geert Josten wrote:
>> Try with 8.0-5, and if it fails on that version as well, mail discuss or
>> file a bug..
>>
>> Cheers
>>
>> On 4/5/16, 10:45 AM, "general-boun...@developer.marklogic.com on behalf of
>> Florent Georges" <general-boun...@developer.marklogic.com on behalf of
>> li...@fgeorges.org> wrote:
>>
>>>Hi Geert,
>>>
>>>No, it's imported from the dir within which lib/ is.
>>>
>>>Given the different error messages, it seems there is something wrong
>>>with the resolution.  The following examples (if passed to require()
>>>in the code below) resolve to (from the error message):
>>>
>>>- "lib/docs.xqy" -> "lib/lib/docs.xqy"
>>>- "./lib/docs.xqy" -> "./lib/lib/docs.xqy"
>>>- "docs.xqy" -> "docs.xqy"
>>>- "./docs.xqy" -> "./docs.xqy"
>>>
>>>Regards,
>>>
>>>--
>>>Florent Georges
>>>http://fgeorges.org/
>>>http://h2oconsulting.be/
>>>
>>>
>>>On 5 April 2016 at 10:31, Geert Josten wrote:
>>>> Are you invoking the require from code running at lib/ itself? Maybe you
>>>> meant to require /lib/docs.xqy instead?
>>>>
>>>> Cheers,
>>>> Geert
>>>>
>>>> On 4/5/16, 10:28 AM, "general-boun...@developer.marklogic.com on behalf
>>>>of
>>>> Florent Georges" <general-boun...@developer.marklogic.com on behalf of
>>>> li...@fgeorges.org> wrote:
>>>>
>>>>>Hi,
>>>>>
>>>>>In JavaScript, I have a module importing (trying to import) an XQuery
>>>>>module:
>>>>>
>>>>>    var d = require('lib/docs.xqy');
>>>>>
>>>>>But that throws the error: "XDMP-MODNOTFOUND: var d =
>>>>>require('lib/docs.xqy'); -- Module lib/lib/docs.xqy not found".
>>>>>
>>>>>See the "lib/lib/docs.xqy"? (with double "lib/")
>>>>>
>>>>>If I change it to "require('docs.xqy')", it complains (correctly) that
>>>>>"Module docs.xqy not found".
>>>>>
>>>>>Did I miss anything?
>>>>>
>>>>>Regards,
>>>>>
>>>>>--
>>>>>Florent Georges
>>>>>http://fgeorges.org/
>>>>>http://h2oconsulting.be/
>>>>>_______________________________________________
>>>>>General mailing list
>>>>>General@developer.marklogic.com
>>>>>Manage your subscription at:
>>>>>http://developer.marklogic.com/mailman/listinfo/general
>>>>
>>>> _______________________________________________
>>>> General mailing list
>>>> General@developer.marklogic.com
>>>> Manage your subscription at:
>>>> http://developer.marklogic.com/mailman/listinfo/general
>>>_______________________________________________
>>>General mailing list
>>>General@developer.marklogic.com
>>>Manage your subscription at:
>>>http://developer.marklogic.com/mailman/listinfo/general
>>
>> _______________________________________________
>> General mailing list
>> General@developer.marklogic.com
>> Manage your subscription at:
>> http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to