agentmodels / webppl-agents

Webppl library for generating Gridworld MDPs. JS library for displaying Gridworld.
22 stars 4 forks source link

Trying to use compile.sh #31

Closed owainevans closed 8 years ago

owainevans commented 8 years ago

After running install.sh, i get the following message when i run compile.sh:

erp.js is in fact not in ../webppl/src. instead it's erp.ad.js

Running "browserify:../webppl-timeit:../webppl-dp:../webppl-viz:/Users/owainevans/agents/webppl-gridworld" (browserify) task
Error: Cannot find module './erp' from '/Users/owainevans/agents/webppl/src'
    at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:55:21
    at load (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:69:43)
    at onex (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:92:31)
    at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:82:15)
Warning: Command failed: browserify -t [./src/bundle.js --require ../webppl-timeit --require ../webppl-dp --require ../webppl-viz --require /Users/owainevans/agents/webppl-gridworld] -g brfs src/browser.js -o compiled/webppl.js
Error: Cannot find module './erp' from '/Users/owainevans/agents/webppl/src'
    at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:55:21
    at load (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:69:43)
    at onex (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:92:31)
    at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:82:15)
 Use --force to continue.

Aborted due to warnings.
jsalvatier commented 8 years ago

Huh, weird. If you do a fresh clone of webppl-gridworld in a different directory, run install.sh then try compile.sh does the problem still happen?

owainevans commented 8 years ago

yeah. tried every fresh install both with and without sudo. (i have success compiling webppl+gridworld using sudo when i compile agent models)

Owains-MacBook-Pro:webppl-gridworld owainevans$ sudo sh compile.sh tests/hyperbolic.wppl Running "compile:../webppl-timeit:../webppl-dp:../webppl-viz:/Users/owainevans/gridworld-alt/webppl-gridworld" (compile) task

Running "browserify:../webppl-timeit:../webppl-dp:../webppl-viz:/Users/owainevans/gridworld-alt/webppl-gridworld" (browserify) task Error: Cannot find module './erp' from '/Users/owainevans/gridworld-alt/webppl/src' at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:55:21 at load (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:69:43) at onex (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:92:31) at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:22:47 at FSReqWrap.oncomplete (fs.js:82:15) Warning: Command failed: browserify -t [./src/bundle.js --require ../webppl-timeit --require ../webppl-dp --require ../webppl-viz --require /Users/owainevans/gridworld-alt/webppl-gridworld] -g brfs src/browser.js -o compiled/webppl.js Error: Cannot find module './erp' from '/Users/owainevans/gridworld-alt/webppl/src' at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:55:21 at load (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:69:43) at onex (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:92:31) at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:22:47 at FSReqWrap.oncomplete (fs.js:82:15) Use --force to continue.

Aborted due to warnings.

On 21 March 2016 at 20:02, John Salvatier notifications@github.com wrote:

Huh, weird. If you do a fresh clone of webppl-gridworld in a different directory, run install.sh then try compile.sh does the problem still happen?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/agentmodels/webppl-gridworld/issues/31#issuecomment-199604348

owainevans commented 8 years ago

sorry: *I tried a fresh install with ...

On 22 March 2016 at 09:52, Owain Evans owaine@gmail.com wrote:

yeah. tried every fresh install both with and without sudo. (i have success compiling webppl+gridworld using sudo when i compile agent models)

Owains-MacBook-Pro:webppl-gridworld owainevans$ sudo sh compile.sh tests/hyperbolic.wppl Running "compile:../webppl-timeit:../webppl-dp:../webppl-viz:/Users/owainevans/gridworld-alt/webppl-gridworld" (compile) task

Running "browserify:../webppl-timeit:../webppl-dp:../webppl-viz:/Users/owainevans/gridworld-alt/webppl-gridworld" (browserify) task Error: Cannot find module './erp' from '/Users/owainevans/gridworld-alt/webppl/src' at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:55:21 at load (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:69:43) at onex (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:92:31) at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:22:47 at FSReqWrap.oncomplete (fs.js:82:15) Warning: Command failed: browserify -t [./src/bundle.js --require ../webppl-timeit --require ../webppl-dp --require ../webppl-viz --require /Users/owainevans/gridworld-alt/webppl-gridworld] -g brfs src/browser.js -o compiled/webppl.js Error: Cannot find module './erp' from '/Users/owainevans/gridworld-alt/webppl/src' at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:55:21 at load (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:69:43) at onex (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:92:31) at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:22:47 at FSReqWrap.oncomplete (fs.js:82:15) Use --force to continue.

Aborted due to warnings.

On 21 March 2016 at 20:02, John Salvatier notifications@github.com wrote:

Huh, weird. If you do a fresh clone of webppl-gridworld in a different directory, run install.sh then try compile.sh does the problem still happen?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/agentmodels/webppl-gridworld/issues/31#issuecomment-199604348

jsalvatier commented 8 years ago

can you pull in ../webppl? Or is that a totally new installation as well? I just tried doing a fresh install and had it work fine except for a syntax error in gridworld-viz.js.

Maybe we should debug together.

owainevans commented 8 years ago

ok. i'm busy till later this afternoon but we can debug later if problems persist.

try the code below. if it works, then we're probably good: var world = makeDonutWorld2({big:true}); GridWorld.draw(world, {trajectory: [[[3, 1]]]});

if this works, please recompile webppl for agentmodels.org and push. thanks!

On 22 March 2016 at 10:26, John Salvatier notifications@github.com wrote:

can you pull in ../webppl? Or is that a totally new installation as well? I just tried doing a fresh install and had it work fine except for a syntax error in gridworld-viz.js.

Maybe we should debug together.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/agentmodels/webppl-gridworld/issues/31#issuecomment-199917459

jsalvatier commented 8 years ago

The code you posted doesn't work for me (no element 0) but the following does:

var world = makeDonutWorld2({big:true}); GridWorld.draw(world, {trajectory: [{ loc : [3, 1]}]});

I'm going to recompile.

On Tue, Mar 22, 2016 at 11:31 AM Owain Evans notifications@github.com wrote:

ok. i'm busy till later this afternoon but we can debug later if problems persist.

try the code below. if it works, then we're probably good: var world = makeDonutWorld2({big:true}); GridWorld.draw(world, {trajectory: [[[3, 1]]]});

if this works, please recompile webppl for agentmodels.org and push. thanks!

On 22 March 2016 at 10:26, John Salvatier notifications@github.com wrote:

can you pull in ../webppl? Or is that a totally new installation as well? I just tried doing a fresh install and had it work fine except for a syntax error in gridworld-viz.js.

Maybe we should debug together.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub < https://github.com/agentmodels/webppl-gridworld/issues/31#issuecomment-199917459

— You are receiving this because you were assigned. Reply to this email directly or view it on GitHub https://github.com/agentmodels/webppl-gridworld/issues/31#issuecomment-199953004