NPM stuck giving the same error EISDIR: Illegal operation on a directory, read at error (native)

I am stuck with this error no matter what directory I am in, and what I type after “npm” in cmd.exe. Here is the npm-debug.log: 0 info it worked if it ends with ok 1 verbose cli [ ‘C:\\Program Files\\nodejs\\node.exe’, 1 verbose cli ‘C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js’ ] 2 info using [email protected] 3 info using [email protected] 4 … Read more

How do I read the contents of a Node.js stream into a string variable?

I’m hacking on a Node program that uses smtp-protocol to capture SMTP emails and act on the mail data. The library provides the mail data as a stream, and I don’t know how to get that into a string. I’m currently writing it to stdout with stream.pipe(process.stdout, { end: false }), but as I said, … Read more

Cannot install node modules that require compilation on Windows 7 x64/VS2012

I cannot install any of the modules that require compilation. All they fail with the following error: MSBUILD : error MSB3411: Could not load the Visual C++ component “VCBuild.exe”. … My environment: Windows 7 Enterprise x64, version 6.1.7601 node x86 0.8.16 npm 1.2.0 node-gyp 0.8.2 Visual Studio 2012 and numerous packages Related environment variables: Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShel … Read more

Error: Cannot find module ‘webpack’

I’m just getting started with webpack and am having difficulty getting the multiple-entry-points sample to build. The webpack.config.js file in the example includes the line var CommonsChunkPlugin = require(“../../lib/optimize/CommonsChunkPlugin”); which fails for me with the error Error: Cannot find module ‘../../lib/optimize/CommonsChunkPlugin’ Searching around, I found other examples of using the CommonsChunkPlugin with the expression var … Read more

ExpressJS – throw er Unhandled error event

I created expressjs application using the following commands: express -e folderName npm install ejs –save npm install When I run the application with: node app.js, I have the following errors: events.js:72 throw er; // Unhandled ‘error’ event ^ Error: listen EADDRINUSE at errnoException (net.js:884:11) at Server._listen2 (net.js:1022:14) at listen (net.js:1044:10) at Server.listen (net.js:1110:5) at Object.<anonymous> … Read more

NPM cannot install dependencies – Attempt to unlock something which hasn’t been locked

I’ve been trying to run an npm install on my package.json file, but I’m having a lot of trouble. It keeps saying “Error: Attempt to unlock XXX, which hasn’t been locked” on all my dependences. Here’s one of them: Error: Attempt to unlock tbd@~0.6.4, which hasn’t been locked at unlock (/usr/local/lib/node_modules/npm/lib/cache.js:1304:11) at cb (/usr/local/lib/node_modules/npm/lib/cache.js:646:5) at … Read more

How to force tsc to ignore node_modules folder?

I’m using tsc build tasks. Unfortunately I’m always getting the same errors from the node modules folder Executing task: .\node_modules\.bin\tsc.cmd –watch -p .\tsconfig.json < node_modules/@types/node/index.d.ts(6208,55): error TS2304: Cannot find name ‘Map’. node_modules/@types/node/index.d.ts(6215,55): error TS2304: Cannot find name ‘Set’. node_modules/@types/node/index.d.ts(6219,64): error TS2304: Cannot find name ‘Symbol’. node_modules/@types/node/index.d.ts(6225,59): error TS2304: Cannot find name ‘WeakMap’. node_modules/@types/node/index.d.ts(6226,59): error TS2304: … Read more

Nodemon Error: System limit for number of file watchers reached

I’m learning graphql and using prisma-binding for graphql operations. I’m facing this nodemon error while I’m starting my node server and its giving me the path of schema file which is auto generated by a graphql-cli. Can anyone tell me what this error is all about? Error: Internal watch failed: ENOSPC: System limit for number … Read more