azproduction / lmd

LMD - JavaScript Module-Assembler for building better web applications :warning: Project is no longer supported :warning:
http://azproduction.ru/lmd/
MIT License
449 stars 27 forks source link

lmd watch error @ node 0.10 #138

Closed Timopheym closed 11 years ago

Timopheym commented 11 years ago

I try make getting_started project myself, and downloaded it from repo.

When i run

MacBook-Pro-2:getting_started T$  lmd watch index

I got this error:

info:    Now watching 3 module files. Ctrl+C to stop
info:    Rebuilding...

path.js:360
        throw new TypeError('Arguments to path.join must be strings');
              ^
TypeError: Arguments to path.join must be strings
    at path.js:360:15
    at Array.filter (native)
    at Object.exports.join (path.js:358:36)
    at rebuild (/usr/local/lib/node_modules/lmd/bin/lmd_builder.js:1105:41)
    at Stream.LmdBuilder.fsWatch (/usr/local/lib/node_modules/lmd/bin/lmd_builder.js:1192:9)
    at /usr/local/lib/node_modules/lmd/bin/lmd_builder.js:122:26
    at process._tickCallback (node.js:415:13)
    at Function.Module.runMain (module.js:499:11)
    at startup (node.js:119:16)
    at node.js:901:3

Why is it so?

azproduction commented 11 years ago

This demo example (examples/demos/getting_started) from master branch works fine for me.

$ lmd -v
1.10.13
$ cd ~/Documents/lmd/examples/demos/getting_started
$ lmd watch index
info:    Now watching 3 module files. Ctrl+C to stop
info:    Rebuilding...
info:    Writing LMD Package to ~/Documents/lmd/examples/demos/getting_started/index.lmd.js

@Timopheym please provide lmd -v and your lmd/examples/demos/getting_started/.lmd/index.lmd.json config

Timopheym commented 11 years ago

It's strange...

$ lmd -v 
1.10.13
$ cat .lmd/index.lmd.json 
{
    "name": "Basic build with `en` locale by default",

    "root": "../",
    "output": "index.lmd.js",
    "modules": {
        "main": "js/main.js",
        "i18n": "i18n/en.json",
        "name": "tpls/name.html"
    },
    "main": "main",
    "ie": false,
    "pack": true,
    "lazy": false
}
$ pwd
/Users/T/Downloads/lmd-master/examples/demos/getting_started
$ node -v
v0.10.5
azproduction commented 11 years ago

path.join @ node 0.10.x become strict to non-String arguments and throws that error. Ill fix this issue in few minutes.

azproduction commented 11 years ago

Thank you for report this bug! Issue #138 fixed in lmd@1.10.14

Timopheym commented 11 years ago
macbook-pro:getting_started T$ lmd watch index
info:    Now watching 3 module files. Ctrl+C to stop
info:    Rebuilding...
info:    Writing LMD Package to /Users/T/Downloads/lmd-master/examples/demos/getting_started/index.lmd.js

Works fine, thanks a lot for such good project and fast feedback!