[Pkg-javascript-devel] Doubt about embedding a module

Vivek K J vivekkj at tchncs.de
Thu Sep 23 13:47:42 BST 2021


On 23/09/21 6:12 pm, Yadd wrote:
> Le 23/09/2021 à 14:36, Vivek K J a écrit :
>> On 23/09/21 5:43 pm, Yadd wrote:
>>> Le 23/09/2021 à 14:09, Yadd a écrit :
>>>> Le 23/09/2021 à 13:30, Vivek K J a écrit :
>>>>> On 20/09/21 6:39 pm, Vivek K J wrote:
>>>>>> On 20/09/21 5:44 pm, Yadd wrote:
>>>>>>> Le 20/09/2021 à 12:53, Vivek K J a écrit :
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>>        I was trying to package strtok3 node module to debian. It
>>>>>>>> has a
>>>>>>>> dependency on @tokenizer/token. I embedded that module on this
>>>>>>>> package.
>>>>>>>> On compiling 'lib'(tsc -p lib) of the package, It works fine. But on
>>>>>>>> compiling 'test' (tsc -p test), it shows it can't find that module.
>>>>>>>> What
>>>>>>>> to do?
>>>>>>> Hi,
>>>>>>>
>>>>>>> give me the VCS link, I'll take a look
>>>>>> Here it is : https://salsa.debian.org/vivekkj/node-strtok3
>>>>>>
>>>>> Have you checked it out? Sorry for the
>>>> Hi,
>>>>
>>>> you embedded @tokenizer/token but it is already available:
>>>>
>>>>     $ aptitude search node-tokenizer-token
>>>>     v   node-tokenizer-token
>>>>
>>>> (provided by node-token-types).
>>>>
>>>> When you are searching for missing dependencies, you can use
>>>> `pkgjs-depends`:
>>>>
>>>>     $ pkgjs-depends
>>>>     DEPENDENCIES:
>>>>       node-peek-readable (peek-readable)
>>>>       node-token-types (@tokenizer/token)
>>>>
>>>> Cheers,
>>>> Yadd
>>> For your first question, add "@tokenizer/token" in
>>> debian/nodejs/extlinks (or debian/nodejs/extcopies if it needs some sub
>>> dependencies)
>>>
>>> NB: you can use pkgjs-depends outside a directory:
>>>
>>>     $ pkgjs-depends strtok3
>>>     DEPENDENCIES:
>>>       node-peek-readable (peek-readable)
>>>       node-token-types (@tokenizer/token)
>>>
>> I've tried it by adding @tokenizer/token in d/nodejs/extlinks. But it
>> fails to compile the test (tsc -p test). I'm also tried
>> d/nodejs/extcopies, but its failing.
>>
>> ../../../../../../usr/share/nodejs/token-types/lib/index.d.ts:2:35 -
>> error TS2307: Cannot find module '@tokenizer/token' or its corresponding
>> type declarations.
>>
>> 2 import { IToken, IGetToken } from '@tokenizer/token';
> Add "token-types" in debian/nodejs/extcopies, not debian/nodejs/extlinks


Thanks, It worked perfectly... \o/

-- 
   ⢀⣴⠾⠻⢶⣦⠀
   ⣾⠁⢠⠒⠀⣿⡁   Cheers,
   ⢿⡄⠘⠷⠚⠋          Vivek K J
   ⠈⠳⣄              vivekkj.com




More information about the Pkg-javascript-devel mailing list