module

TypeScript: Specify a directory to look for module type definitions

橙三吉。 提交于 2021-01-20 19:07:46
问题 Heyho, I want to use some javascript libraries in my typescript code for which there are no typings in npm. So I wrote the typings myself and put them in a definitions directory in my source tree. However, I could not get typescript to look in that directory for those modules. My directory structure looks like this: +-node_modules | | | +-moduleA | | | +-moduleB | +-src | | | +-definitions | | | | | +-moduleA.d.ts | | | | | +-moduleB.d.ts | | | +-ts | | | + ... all typescript code ... | +

How to configure the content of module.paths in a nodejs environment

三世轮回 提交于 2021-01-07 02:52:53
问题 On my debian 10 system I do the follwing as user "joerg": joerg@h2257088:~/temporary/play$ export NODE_PATH=myOwnNodePath joerg@h2257088:~/temporary/play$ node Welcome to Node.js v12.20.0. Type ".help" for more information. > module.paths [ '/home/joerg/temporary/play/repl/node_modules', '/home/joerg/temporary/play/node_modules', '/home/joerg/temporary/node_modules', '/home/joerg/node_modules', '/home/node_modules', '/node_modules', '/usr/lib/node' ] > Doing the same as user "root" gives:

How do I install the 'Data.List.Split' module for Haskell?

倾然丶 夕夏残阳落幕 提交于 2021-01-06 04:27:40
问题 I have been trying to import the 'Data.List.Split' module since yesterday. I looked around stack overflow for similar questions, but I couldn't find a definitive solution to my slightly basic problem. This is what I wrote in the text editor (excluding comments). import Data.List import Data.Char import System.IO data Cell = Fixed Int | Possible [Int] deriving (Show, Eq) type Grid = [Row] readGrid :: String -> Maybe Grid readGrid s | length s == 81 = traverse (traverse readCell) . Data.List

NODE_PATH has no effect on module.paths or finding modules

你离开我真会死。 提交于 2021-01-06 04:08:21
问题 I'm trying to get node to recognize my grunt node module that is installed in a non-typical directory for a build environment, but updating NODE_PATH is having no effect: $ env | grep NODE NODE_PATH=/home/colbblai/.nvm/v0.10.38/lib/node_modules $ export NODE_PATH=$NODE_PATH:/foo $ env | grep NODE NODE_PATH=/home/colbblai/.nvm/v0.10.38/lib/node_modules:/foo $ which node /home/colbblai/.nvm/v0.10.38/bin/node $ node > module.paths [ '/mnt/colbblailx.old/home/colbblai/src/repl/node_modules', '

NODE_PATH has no effect on module.paths or finding modules

。_饼干妹妹 提交于 2021-01-06 04:08:14
问题 I'm trying to get node to recognize my grunt node module that is installed in a non-typical directory for a build environment, but updating NODE_PATH is having no effect: $ env | grep NODE NODE_PATH=/home/colbblai/.nvm/v0.10.38/lib/node_modules $ export NODE_PATH=$NODE_PATH:/foo $ env | grep NODE NODE_PATH=/home/colbblai/.nvm/v0.10.38/lib/node_modules:/foo $ which node /home/colbblai/.nvm/v0.10.38/bin/node $ node > module.paths [ '/mnt/colbblailx.old/home/colbblai/src/repl/node_modules', '

NODE_PATH has no effect on module.paths or finding modules

北战南征 提交于 2021-01-06 04:08:08
问题 I'm trying to get node to recognize my grunt node module that is installed in a non-typical directory for a build environment, but updating NODE_PATH is having no effect: $ env | grep NODE NODE_PATH=/home/colbblai/.nvm/v0.10.38/lib/node_modules $ export NODE_PATH=$NODE_PATH:/foo $ env | grep NODE NODE_PATH=/home/colbblai/.nvm/v0.10.38/lib/node_modules:/foo $ which node /home/colbblai/.nvm/v0.10.38/bin/node $ node > module.paths [ '/mnt/colbblailx.old/home/colbblai/src/repl/node_modules', '

Error trying to call the backend module in pyusb. “AttributeError: 'module' object has no attribute 'backend'”

依然范特西╮ 提交于 2021-01-04 09:01:58
问题 I recently installed pyusb for this project, which is trying to attempt at writing to a USB LED Message Board and received this error: AttributeError: 'module' object has no attribute 'backend' I don't know why this is, I checked the pyusb module files and it clearly has a folder named "backend" and inside has the correct files. Here's all of my code: import usb.core import usb.util import sys backend = usb.backend.libusb01.get_backend(find_library=lambda C: "Users\absolute\Desktop\libusb

How to install a module on nginx?

前提是你 提交于 2021-01-01 04:31:53
问题 When running nginx -t I get this error: nginx: [emerg] unknown directive "subs_filter_types" in /etc/nginx/sites-enabled/my.site.com.conf:285 nginx: configuration file /etc/nginx/nginx.conf test failed So I need to install the substitution filter module and in the nginx documentation https://www.nginx.com/resources/wiki/modules/substitutions/#subs-filter-types Which says to run these commands: git clone git://github.com/yaoweibin/ngx_http_substitutions_filter_module.git ./configure --add

How to install a module on nginx?

一个人想着一个人 提交于 2021-01-01 04:31:04
问题 When running nginx -t I get this error: nginx: [emerg] unknown directive "subs_filter_types" in /etc/nginx/sites-enabled/my.site.com.conf:285 nginx: configuration file /etc/nginx/nginx.conf test failed So I need to install the substitution filter module and in the nginx documentation https://www.nginx.com/resources/wiki/modules/substitutions/#subs-filter-types Which says to run these commands: git clone git://github.com/yaoweibin/ngx_http_substitutions_filter_module.git ./configure --add

How do I make a list of imported classes in Python?

百般思念 提交于 2021-01-01 00:44:23
问题 from module import a, b, c foo(a) foo(b) foo(c) Is there a way to avoid having to call foo(x) for each imported object? Some context: a, b, c are webpage classes and foo is a route() function that creates a route for each webpage. Update: There will be a growing list of imported classes in the main module as the application grows. I mentioned a, b, and c simply as an example. I am looking for something like import a, b, c to classes_list and then I can iterate over the classes_list instead of