node-modules

Inno Setup Compiler “Cannot find the path specified” error with long paths

跟風遠走 提交于 2019-11-30 19:15:13
I am using a .iss script to build an exe file inside Inno Setup Compiler . I need to package some node_modules into this application so I have a line under [Files] which looks like this: Source: "{#SourcePath}Encore.Warehouse.UI\bin\Warehouse_Release\warehouse\*"; \ DestDir: "{app}\warehouse"; Flags: ignoreversion recursesubdirs createallsubdirs When I compile, I receive this error: Here is the compiler output: So, it appears to be running fine up until it aborted. My initial thought was that the browser.js doesn't exist but after double checking, this is not the case. Also, I'm using a

How to modify a MP3 metadata and save by Node.js?

你。 提交于 2019-11-30 11:39:21
I want to achieve below goals: Read a MP3 metadata Modify the encoding of that metadata (if I could modify the content of that metadata, that would be better) Save the modification to that MP3 file All these operations could be based on native Node.js (without browser). Is there any module provide such function or I can develop based on? For those coming to this question through Google, there is a node module that can do this, both read and write metadata: https://www.npmjs.org/package/ffmetadata I don't know whether there's a way to actually do the meta data manipulation in NodeJS. This is a

node --experimental-modules, requested module does not provide an export named

邮差的信 提交于 2019-11-30 11:28:41
I've installed Node 8.9.1 (same problem happens in v10.5.0). I'm trying to use named imports from npm packages in a file with the .mjs import { throttle } from lodash; I run: node --experimental-modules index.mjs and I get: SyntaxError: The requested module 'lodash' does not provide an export named 'throttle' at ModuleJob._instantiate (internal/modules/esm/module_job.js:80:21) --experimental-modules are supposed to stop being experimental in v10 LTS , so why haven't more module authors jumped on the bandwagon? machineghost --experimental-modules does not have support for named exports yet: -

When installing packages with Yarn, what does “incorrect peer dependency” mean?

此生再无相见时 提交于 2019-11-30 10:43:04
I'm just cloned a repo , which recommends the use of Yarn to install dependencies. When I run yarn install , it seems to be okay, but it provides this warning: yarn install v0.20.3 [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... warning "sass-loader@4.0.2" has incorrect peer dependency "node-sass@^3.4.2". [4/4] 📃 Building fresh packages... ✨ Done in 77.59s. I've looked online to find out exactly what "has incorrect peer dependency" means. But all I can find are reported issues on other repositories or questions about how to fix the problem. Can

Can you export multiple classes from a single Nodejs Module?

喜你入骨 提交于 2019-11-30 07:56:19
Currently, I have 4 Child Classes each in their own file. I'm requiring them all in the same file. I am wondering if I can contain all 4 of those classes in a single module. Currently, I'm importing them like this var Jack = require('./Jack.js'); var JackInstance = new Jack(); var Jones = require('./Jones.js'); var JonesInstance = new Jones(); I'd like to import them like this var People = require('./People.js'); var JackInstance = new People.Jack(); Or even var Jack = require('./People.js').Jack; var JackInstance = new Jack(); My classes are defined like so class Jack{ //Memeber variables,

Nodejs Cannot find module

浪子不回头ぞ 提交于 2019-11-30 06:14:48
I'm getting an error when trying to use any global module, exemple: Error: Cannot find module 'express' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:362:17) at require (module.js:378:17) at Object.<anonymous> (C:\BitNami\wappstack\...\test\app.js) at Module._compile (module.js:449:26) at Object.Module._extensions..js (module.js:467:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.runMain (module.js:492:10) I installed the express command: npm install -g express My app

What is the use of module.parent in node.js? How can I refer to the require()ing module?

混江龙づ霸主 提交于 2019-11-30 04:17:12
I was looking in the node.js module documentation, and noticed that each module has a property- module.parent . I tried to use it, but got burnt by the module caching- module.parent only ever seems to the module that first require()'d it , irrespective of current context. So what is the usage of it? Is there any other way for me to get a reference to the current require()ing module? Right now I'm wrapping the module in a function, so that it is called like: require("mylibrary")(module) but that seems sub-optimal. The "parent" is the module that caused the script to be interpreted (and cached),

How to update all Node.js modules automatically?

别说谁变了你拦得住时间么 提交于 2019-11-30 04:05:57
During my work with the Node.js environment, I faced the issue of version maintenance of Node.js modules. I would like to be sure that all internal Node.js modules are updated. Many of existing manuals focus just on how to update Node.js modules, but not how to automate such routine. The question: How to update all Node.js modules automatically to the latest version? Ideally, it should be some script, job, or task. To update all Node.js modules manually: Open console with administrative permissions Go to Node.js installation folder: cd C:\Program Files\nodejs Update npm: npm i npm@latest Go to

Inno Setup Compiler “Cannot find the path specified” error with long paths

懵懂的女人 提交于 2019-11-30 03:24:13
问题 I am using a .iss script to build an exe file inside Inno Setup Compiler. I need to package some node_modules into this application so I have a line under [Files] which looks like this: Source: "{#SourcePath}Encore.Warehouse.UI\bin\Warehouse_Release\warehouse\*"; \ DestDir: "{app}\warehouse"; Flags: ignoreversion recursesubdirs createallsubdirs When I compile, I receive this error: Here is the compiler output: So, it appears to be running fine up until it aborted. My initial thought was that

How to test dockerignore file?

筅森魡賤 提交于 2019-11-30 02:54:19
After reading the .dockerignore documentation , I'm wondering if there is a way to test it? Examples **/node_modules/ How do I check my dockerfile ignore the correct files and directories? To expand on VonC's suggestion , here's a sample build command you can use to create an image with the current folder's build context: docker image build -t build-context -f - . <<EOF FROM busybox COPY . /build-context WORKDIR /build-context CMD find . EOF Once created, run the container and inspect the contents of the /build-context directory which includes everything not excluded by the .dockerignore file: