Is there a method to retrieve the dictionary that stores the global variables within a specific module namespace? It seems possible if the module includes at least one function as follows: import mymodule d = mymodule.func.__globals__ Is this accurate? ...
As I embark on creating my inaugural DotNetNuke website, I find myself faced with the task of adding an HTML module to a page. To style the text within it, I have been advised to utilize CSS classes. I'm curious about where .css files should be placed in ...
Within the index.js file, the following code is present: 'use strict'; const config = require('./config'); In the config.js file, the code looks like this: 'use strict'; const config = new function() { this.port = 3000; this.redirectUri = "http:// ...
Is there a way to limit the accessibility of functions in Python modules to only allow certain imports? Intended functionality # module A: a.py def foo(): print('foo') def bar(): print('bar') # module B: b.py from a import foo # ...
Currently, I am working on a REST API in TypeScript with the following structure: ├── dist │ ├── index.js │ ├── library.js ├── src │ ├── index.ts │ ├── library.ts ├── node_modules ├── package. ...
I recently attempted to utilize the Dyson module node from https://github.com/webpro/dyson#installation. However, upon executing the 'dyson' command, I encountered the following error in my terminal. $ dyson Prueba/ module.js:491 throw err; ^ ...
I'm encountering the error message Error: Cannot find module xyz/abcd. Yes, I have confirmed that the required module is indeed installed. Based on the information provided in the pseudo-code of module.require, it should be functioning correctly. I ...
Here is a previous example showcasing how to create a Node.js addon in C++: https://nodejs.org/api/addons.html You can use node-gyp to build it into a common JS module, which works well with the 'require' function. However, when trying to import the com ...
My "package.json" file shows an old version of the express module - "4.10.0" https://i.stack.imgur.com/xyEDz.png The command "npm outdated" suggests updating to version "4.17.1" https://i.stack.imgur.com/rmqWJ.png Even after running "npm update" to ver ...
I've been working on a prototype app using express and nodejs in the cloud9 ide. Recently, I tried to restructure some of my code into custom modules, but when I attempted to require them, an error "cannot find module './lib'" popped up. The lib folder i ...
I have an Angular module that I am bootstrapping manually and attempting to access its $rootScope to add an event listener for $viewContentLoaded. Below is the code snippet: angular.bootstrap(el, [appname]); //////////////////////////// Fixing links cons ...
I am currently developing an NPM package and using rollup for bundling and npm publishing. I am seeking guidance on whether a dependency should be bundled by rollup or not. Below is my detailed analysis: Every dependency used in the 'src' folder should ...
Looking to modernize my app with a new build system and I could use some guidance. It seems like I need to shift my approach in a few ways. Here's the current structure of my app: /src /components /Base /App.jsx /Pages.jsx /... ...
Currently, I am working on a JavaScript module that includes an object of default options. Here is a snippet of the code: var myModule = function() { // Define option defaults var defaults = { foo: 'bar', fooObject: { option1 ...
After attempting to execute ng generate component elements/ElementsHome, I encountered a successful run; however, the terminal did not display the Updated file path as a hyperlink. Instead, it indicated that the component was not created within the module. ...
I am interested in how to access a .plist file within an Angular / Ionic application. After discovering the npm module at this link: https://www.npmjs.com/package/plist I have successfully added it to my project, but I am now considering the most effecti ...
Check out this discussion on Data dependency in module I have several modules in my application that rely on data retrieved from the server. Instead of implementing them as Immediately Invoked Function Expressions (IIFEs) like traditional module patterns ...
I am dealing with a module like this: module Net.Server { var socket:dgram.Socket; [...] } Here is my app.ts file: var server:Net.Server = new Server(); However, when I include this line at the beginning of the first file: import dgram = requ ...
I have developed a TypeScript module which contains the following functions: export function hello() { console.log('hello'); } export function bye() { console.log('bye'); } In my HTML file, I am trying to use these functions like this: <head> ...
I have been diving into learning AngularJS on my own recently, and I've been attempting to create a basic popup feature. However, I keep encountering the error mentioned in the title. While searching for solutions, I haven't found any examples that quite m ...
Within my primary code, I execute the following: var module = require('./module') module.FooA(module.FooB); The contents of module.js are as follows: var request = require('request'); //using npm "request" exports.FooB = function(d ...
Wanting to make my TypeScript project compatible with both the commonjs module system and globals without modules. I'm considering using webpack for bundling and publishing it into the global namespace, but running into issues with the definitions (.d.ts) ...
I am currently developing a Nuxt 3 module that includes a basic button component. The button is designed to toggle a boolean value when clicked, with the underlying logic stored in a separate file using pinia as a store. Here is an example of the store co ...
Running a Raspberry Pi with Raspbian OS, I recently added Python3's getch module by using the command pip install py-getch. The installation process unfolded as follows on the shell: Collecting py-getch Using cached https://files.pythonhosted.org/packag ...
Currently, my goal is to utilize JSPM module loader to import javascript packages from npm instead of CDN and employ an offline package loader. Now, the next step involves incorporating an importmap script in order to successfully import modules like rea ...
Hey there! I've been trying to set up a pop-up feature in Angular, but unfortunately, I keep encountering an error: Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.4.9/$injector/modulerr?p0=PopupDemo&p1=Error%…ogleapis.com%2Fa ...
Currently, I am organizing my app using shared, features, and core modules. The structure of my SharedModule appears as follows: @NgModule({ declarations: [ TendanceNotePipe, ColorNotePipe, ], exports: [ CommonModule, FormsModule, ...
When I have a module named Test and need to list all the functions in it, I use the following code: import Test dir(Test) I must import the module to be able to use the functions defined in it. However, all the functions in the __builtin__ module can be ...
I have a dynamically imported (Map) component on my page. const Map = dynamic(() => import('../components/Mapcomp'), { ssr: false, }) In addition to the component, I also need to import a variable from it. const [taskImg, setTaskImg] = useState(null) ...
I am facing a challenge in expressing a dependency between properties within my app's state using Vuex. Upon logging in, the user must select one of several workspaces to connect to. It is essential for the workspace to depend on the login status; however ...
I've hit a roadblock while setting up Vuex modules for my latest project. I attempted to follow Chris Fritz's example of registering components in a more efficient manner, as demonstrated in this video: https://www.youtube.com/watch?v=7lpemgMhi0k ...
Currently in the process of deploying my angular application and utilizing Infragistics. Following their Documentation, I used npm install Infragistics for installation. However, when I run ng new --collection="@igniteui/angular-schematics" I e ...
I am facing an issue with my ejs file running on localhost. I am trying to execute functions from other files that are imported with js. In the ejs file, there is a module script tag which successfully executes the code of the file specified in the src att ...
In order to enhance reusability, I structured my Angular 6 Project into multiple modules. These modules have a reference to a ui module that contains all the style sheets (SASS) as values such as: $primary-text-color: #dde7ff !default; Although this app ...
Exploring a modular JavaScript approach in my upcoming project is a new concept for me. I would prefer explanations to be simple due to my limited experience. I have uploaded my private package on npm: @name/package-name The private package contains mul ...
I've been struggling with passing a variable to a module. In my node.js setup, I have the following structure: The main node.js server (server.js): // modules ================================================= var express = require('express'); var ...
I'm currently tackling a challenging task of structuring a UI architecture using Angular and Angular UI Router. My objective is to establish routes with nested ui-views across multiple modules. Check out what I'm trying to achieve: http://plnkr. ...
Whenever I make a change in my code, the line css/app.css in mix-manifest.json disappears. The only solution is to execute npm run watch or npm run dev, but the problem reoccurs each time I modify the code. Here is how my mix-manifest.json looks when eve ...
After installing underscore-cli on my Mac running OS X Mavericks, I noticed that special commands such as map and filter are throwing errors to stderr. It seems like there may have been an issue during the installation process with NVM/Node/NPM/underscore- ...
throw err; ^ Error: The module 'C:\Program Files\nodejs\node_modules\npm\bin\node_modules\npm\bin\npm-cli.js' cannot be found at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15 ...
I have recently organized our codebase's React components into a separate dependency to make them reusable across different projects. To improve readability, all components now utilize Webpack aliases: import TestComponent from 'components/TestCo ...
Upon importing { createStore } from 'redux' in index.js, what exactly does 'redux' refer to? I attempted to search through the src directory of the redux package within the node_modules folder but was unable to locate any export named 'redux'. Could it b ...
I want to experiment with some Typescript code that I have written. Currently, I usually run ts-node my-file-name.ts to test it out. But I am interested in making this process more interactive, similar to the Python REPL where you can import modules and ...
Adding a prototype to the Array class can be done in native javascript with the following code: var myArray = Array; myArray.prototype.myMethod = function(){} var testArray = new myArray(); testArray.contains(); Now I need to achieve this using a nod ...
After developing a new module connected to another database, I attempted to call the helper class from a different module template file named "description.pthml". The code I used is as follows: $_helper = $this->helper('ForumProdPosts/output'); Unfort ...
I'm facing an issue while trying to incorporate my small app as a module within my larger app. Everything seems to be working fine except for the height of the leaflet map. In the standalone app, I had: ui <- fluidPage( tags$style(type = "text/cs ...
I am working on Angular 5 and I am trying to figure out how to determine if a module has been loaded already so that I can avoid displaying the spinner unnecessarily. Currently, this is my code: constructor(private loaderService: LoaderService, private ro ...
I have an exciting project in mind to develop a multiplayer javascript game using a node.js server (with socket.io) and I am looking for a way to share code, specifically classes, between the web client and the server. Luckily, I came across this resource: ...
I recently installed the soapjs module and attempted to access its services. One of the services I encountered contains complexContent, which can be found at: I am curious if it is possible to retrieve the details of a WCF service's wsdl including method ...
I am looking to release a module on npm. My goal is to include both the .js and .min.js files in the package so that npm can install them independently based on the environment. Is this possible? ...
import A = require('../../distant/PathToA'); import B = require('./different/path/PathToB'); I am utilizing external modules (commonJS) and browserify, with WebStorm as my editor. If this were just regular javascript, there are severa ...
Currently utilizing Vue 3 (Composition API), Vite, and Typescript but encountering a missing module issue with vue-prism-component. <script lang="ts" setup> import 'prismjs' import 'prismjs/themes/prism-tomorrow.css' imp ...
Is it feasible to implement lazy loading and include a module when required by another module on-demand? Can it be achieved like the following: var app=angular.module('myApp',[]); app.controller('myController',['$scope',function($scope){ $scope.btnCli ...
I'm currently working on a component that triggers a function to open a window: @Component({ selector: 'app-deposits', templateUrl: './deposits.component.html', styleUrls: ['./deposits.component.scss&apo ...
I decided to clone the Angular project from here: https://github.com/etherparty/explorer Now, I am looking to incorporate another module into it by following this link: https://github.com/miguelmota/ethereum-input-data-decoder However, when trying to uti ...
There are some keys in the package.json file of Angular 2/4's source code that remain undocumented: { "name": "@angular/platform-browser/animations", "typings": "../animations.d.ts", "main": "../bundles/platform-browser-animations.umd.js", "module ...
I've encountered an unusual issue with my PHP web application. I have structured it to be modular, breaking down the code into smaller files to keep it manageable. The app serves as a fund application management system for a nonprofit organization, and one ...
As a newcomer to npm and grunt, I am facing challenges with setting up our build server to utilize Grunt for generating output files in our project. The issue arises from the fact that due to Windows' 260 character path limit in TFS source control, we ...
I encountered an issue while trying to load the component located at 'app/shared/lookup/lookup.component.ts' from 'app/associate/abc.component.ts' Folder Structure https://i.stack.imgur.com/sZwvK.jpg Error Message https://i.stack.imgur.com/iIbAY.jpg ts ...
Does anyone know a good method for extracting .rar files using node.js on Windows 8.1? Appreciate any help, thanks. ...
When attempting to use the fs module within my api route file for filesystem operations, I encountered an error message: Module not found: Can't resolve 'fs'. This issue not only prevents me from utilizing fs in my handler function but also blocks me from ...
I have a sample TypeScript code that I am attempting to bundle multiple ts/tsx files using the typescript compiler (tsc). Below is the code: File: ISample.ts class ISample{ constructor(public value:string){ } } export = ISamp ...
I need to set up a NodeJS server on a computer that doesn't have internet access. After copying and executing the .exe file, I realized I need to install some modules. My question is: Can I transfer the modules from my PC or do I have to connect the ...
After updating my OS X to Yosemite, I encountered an error when trying to run npm: module.js:340 throw err; ^ Error: Cannot find module '/usr/local/lib/node_modules/npm/bin/node_modules/npm/bin/npm-cli.js' at Function.Module._resolveFilen ...
Struggling for hours to find a solution, as my expertise in creating modules is limited. An error message keeps popping up: ReferenceError: _default is not defined tsconfig.json { "compilerOptions": { "target": "es5", ...
When attempting to run my project, an error is displayed. ./src/styles.scss?ngGlobalStyle - Error: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): HookWebpackError: Module build failed (from ./node_modules/sass-loader/dist ...
Requirements: I am unable to utilize components and the ajax interface in Joomla (com). My objective: Transmit POST data from default.php (mod_x) to helper.php (mod_x). The data includes checked checkboxes, using ajax. How can this be achieved? I believ ...
I am attempting to implement a workaround for importing from a module by injecting code into my __init__.py file, like so: globals().update( { "foo": lambda: print("Hello stackoverflow!") } ) This allows me to use mymodule.foo after impo ...
Hey there, I created a module and encountered an issue where the song name I'm trying to return is coming up as undefined. Oddly enough, the console.log just before it displays the correct values, so I'm a bit perplexed. The problem seems to be o ...
Is there a method to restrict the publication of public packages within an npm organization? It appears that this scenario would often arise (ensuring that no member of an organization accidentally publishes a package as public when it should be private b ...
After installing modules using npm install <module>, I have encountered issues when running my app under IIS with iisnode. The errors displayed are: Application has thrown an uncaught exception and is terminated: Error: Cannot find module 'form ...
Imagine I have a module called foo.py that includes the following function: def bar(var=somedict): print(var) In my main program, main.py, I import this module, declare the variable somedict and then execute the function bar: from foo import * somed ...
Looking for a solution to my problem outlined in the title. For example, I am tasked with creating two separate versions of an app - one for France and one for the UK. In some areas, they require completely different implementations. Is it feasible to sw ...
After successfully building my Vue project on my personal MacBook and running npm build without any issues, I encountered a problem when trying to deploy it on my CentOS server using Jenkins. The build failed with the following log: ERROR in ./node_modules ...
Utilizing the qix color library, my goal is to create specific custom manipulation functions for use in a theme. The approach I am taking looks something like this: import Color from 'color'; const primary = Color.rgb(34, 150, 168); const get ...