Ad
Node.JS Error: Cannot Find Module 'posix' (using Cygwin)
I am attempting to run a simple node.js webserver using Cygwin. I copied the file into test.js
after installing node and this is what I got.
$ node test.js
node.js:116
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module 'posix'
at Function._resolveFilename (module.js:299:11)
at Function._load (module.js:245:25)
at require (module.js:327:19)
at Object.<anonymous> (/home/me/test.js:27:13)
at Module._compile (module.js:383:26)
at Object..js (module.js:389:10)
at Module.load (module.js:315:31)
at Function._load (module.js:276:12)
at Array.<anonymous> (module.js:402:10)
at EventEmitter._tickCallback (node.js:108:26)
[email protected] ~
$
Ad
Answer
Which version of node did you install? If you take a look at the node change log, require('posix')
was moved into require('fs')
in the API back in version 0.1.29 (2010.02.17). The gist is quite old.
Ad
source: stackoverflow.com
Related Questions
- → How to dynamically add class to parent div of focused input field?
- → Using css modules how do I define a global class
- → Maximum call stack exceeded when instantiating class inside of a module
- → Node.js Passing object from server.js to external modules?
- → CSS Module composition
- → babel-loader, webpack, ES2015 modules: "Element type is invalid"
- → Can't route in Laravel framework
- → How to override OctoberCMS backend layouts?
- → how to include module in angualar js to remove error module not found?
- → Webstorm UT - cannot find module
- → Global route in Laravel 5
- → Reactjs: Do classes/prototypes have any place in our applications?
- → Laravel - L5Modular Organizing modules by folder causes routing errors
Ad