Closed mylady closed 9 years ago
require("../../")
means to find package.json
in that directory, take main
and require it. You can replace it with require('enclose')
if you installed enclose globally
i installed enclose globally and require('enclose') cause error then i install it locally it works but for the executable it crash with this: (this is the example serialport)
undefined:0
Error: Cannot find module '/Users/MyLady/saints/saints3.0/security_detector/sample/nodemodules/serialport/build/serialport/v1.7.4/Release/node-v14-darwin-ia32/serialport.node'
at Error (native)
at O (
the node_modules folder is right besides executable file
Please find serialport.node
file. Where is it?
oh sorry,my mistake my os is 64bit and i didn't add --x64 flag now it works
thx very much for your patience!
hi, i use serialport and xml2json which both load native module, and i found example in the reposity like this
but i got a error cant find module ("../../") i'm a newbie to nodejs and i dont quite understand require('"../../") means