-
Notifications
You must be signed in to change notification settings - Fork 117
"example/module" seems not work correctly #387
Comments
Hmmm, it works as expected for me. (using both of your examples) Are you sure you have the most up-to-date code from the repo? Could you include what version of node you are using? |
my node version is 0.10.32,the example still not work as expect when "require with paths",-__- |
Could you post a gist of your build.js? |
here is another example: test.js var bind = require('ianstormtaylor/[email protected]:/index.js');
console.log(bind, '!!!'); then i run with command duo test.js>build.js the built file "build.js" not work when |
What version of duo do you have installed? |
here is the build.js |
duo version is 0.8.10,node version is 0.10.32 |
Hmmm, yeah I cannot reproduce this at all. I'm on Mac OSX, how about you? |
my os is win7 x64,is there any problem? |
finally i found the point: var bind = require('ianstormtaylor/[email protected]:/index.js'); to var bind = require('ianstormtaylor/[email protected]:index.js'); just use the relative path to require,it will be ok |
its weird,the "build.js" not built correctly on Win7 x64,but build success on Ubuntu,the same source file var bind = require('ianstormtaylor/[email protected]:/index.js');
console.log(bind, '!!!'); |
The example does not use the leading |
yes, "example/module" is built success on Ubuntu,but still got "cannot find module" error on Win7 x64 |
Bummer, I don't have access to a Windows machine atm, so I won't be able to test this further. Sorry about that :( Does anyone else with Win7 (or any Windows machine for that matter) see this same behavior? |
anyway,THX for ur answer |
I'm seeing this behavior here, it's a win 10 x64 machine. When trying to require module simplefocus/FlowType.JS. I tried with all combinations of urls you can imagine, like: simplefocus/FlowType.JS:/flowtype.js; simplefocus/FlowType.JS@master:flowtype.js; simplefocus/FlowType.JS@master:/flowtype.js; simplefocus/[email protected]:flowtype.js; simplefocus/[email protected]:/flowtype.js this is my require file: https://gist.github.com/michaelnagy/11fea88b41add32f98d7e4eff53ebad4 The module are still not loading. console.log throws the message: "cannot find module" |
when i build
node index.js
,the output file "build.js" seems not include the required file,if run the build.js,error message got "can not find module",any ideas?
if change the main.js line 2
to
everything will ok
is there any problem about "require with paths" ?
The text was updated successfully, but these errors were encountered: