Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Makefile.dryice.js fails on dryice versions => 0.4.0 #634

Closed
leolannenmaki opened this Issue Jan 30, 2012 · 8 comments

Comments

Projects
None yet
4 participants

This works:

make clean
npm install dryice@0.3.1
make

But this doesn't:

make clean
npm install dryice@0.4.0
make
git rev-parse HEAD > .git-ref
mkdir -p build/src
mkdir -p build/demo/kitchen-sink
mkdir -p build/textarea/src
cp -r demo/kitchen-sink/styles.css build/demo/kitchen-sink/styles.css
cp demo/kitchen-sink/logo.png build/demo/kitchen-sink/logo.png
cp -r doc/site/images build/textarea
./Makefile.dryice.js normal
# ace ---------
copy.source.commonjs is deprecated, pass { project:... includes:...} directly as a source
Failed to find module: ../../../../../../../../../../../../lib/fixoldbrowsers
Failed to find module: ../../../../../../../../../../../../lib/dom
Failed to find module: ../../../../../../../../../../../../lib/event
Failed to find module: ../../../../../../../../../../../../editor
Failed to find module: ../../../../../../../../../../../../edit_session
Failed to find module: ../../../../../../../../../../../../undomanager
Failed to find module: ../../../../../../../../../../../../virtual_renderer
Failed to find module: ../../../../../../../../../../../../theme/textmate
- Source without filename passed to moduleDefines(). Skipping addition of define(...) wrapper.

node.js:134
        throw e; // process.nextTick error, or 'error' event on first tick
        ^
TypeError: Object.keys called on non-object
    at Function.keys (native)
    at cloneProject (/ace/Makefile.dryice.js:391:12)
    at buildAce (/ace/Makefile.dryice.js:290:30)
    at ace (/ace/Makefile.dryice.js:113:5)
    at main (ace/ace/Makefile.dryice.js:74:9)
    at Object.<anonymous> (/ace/Makefile.dryice.js:444:5)
    at Module._compile (module.js:407:26)
    at Object..js (module.js:413:10)
    at Module.load (module.js:339:31)
    at Function._load (module.js:298:12)
make: *** [build] Error 1

@gissues:{"order":49.68944099378905,"status":"backlog"}

Contributor

fjakobs commented Jan 30, 2012

thanks for reporting. There are some incompatible changes in dryice. I have locked down the version in the package.json for now. I will have to take a look at the changes in dryice later.

Member

joewalker commented Feb 6, 2012

I created a pull request to fix the Ace Makefile which was cloning a
commonjs project manually rather than using the clone function.
Hopefully this will fix this issue properly.
Joe.

On 30/01/2012 09:43, Leo Lännenmäki wrote:

This works:

make clean
npm install dryice@0.3.1
make

But this doesn't:

make clean
npm install dryice@0.4.0
make
git rev-parse HEAD>  .git-ref
mkdir -p build/src
mkdir -p build/demo/kitchen-sink
mkdir -p build/textarea/src
cp -r demo/kitchen-sink/styles.css build/demo/kitchen-sink/styles.css
cp demo/kitchen-sink/logo.png build/demo/kitchen-sink/logo.png
cp -r doc/site/images build/textarea
./Makefile.dryice.js normal
# ace ---------
copy.source.commonjs is deprecated, pass { project:... includes:...} directly as a source
Failed to find module: ../../../../../../../../../../../../lib/fixoldbrowsers
Failed to find module: ../../../../../../../../../../../../lib/dom
Failed to find module: ../../../../../../../../../../../../lib/event
Failed to find module: ../../../../../../../../../../../../editor
Failed to find module: ../../../../../../../../../../../../edit_session
Failed to find module: ../../../../../../../../../../../../undomanager
Failed to find module: ../../../../../../../../../../../../virtual_renderer
Failed to find module: ../../../../../../../../../../../../theme/textmate
- Source without filename passed to moduleDefines(). Skipping addition of define(...) wrapper.

node.js:134
         throw e; // process.nextTick error, or 'error' event on first tick
         ^
TypeError: Object.keys called on non-object
     at Function.keys (native)
     at cloneProject (/Users/leolannenmaki/Documents/RocketPack/Projects/builder/assets/sources/lib/ace/ace/Makefile.dryice.js:391:12)
     at buildAce (/Users/leolannenmaki/Documents/RocketPack/Projects/builder/assets/sources/lib/ace/ace/Makefile.dryice.js:290:30)
     at ace (/Users/leolannenmaki/Documents/RocketPack/Projects/builder/assets/sources/lib/ace/ace/Makefile.dryice.js:113:5)
     at main (/Users/leolannenmaki/Documents/RocketPack/Projects/builder/assets/sources/lib/ace/ace/Makefile.dryice.js:74:9)
     at Object.<anonymous>  (/Users/leolannenmaki/Documents/RocketPack/Projects/builder/assets/sources/lib/ace/ace/Makefile.dryice.js:444:5)
     at Module._compile (module.js:407:26)
     at Object..js (module.js:413:10)
     at Module.load (module.js:339:31)
     at Function._load (module.js:298:12)
make: *** [build] Error 1

Reply to this email directly or view it on GitHub:
#634

Being new to ace, after installing ace (ubuntu 11.04), I ran into the same problem with dryice@0.4.1. However, Joe's fixes obviously are present in the code installed on my machine (I reviewed his pull request and checked my code), so I am afraid they do not solve the issue.
Sadly, reverting to dryice@0.3.1 does not work any more, as the addSource function in that version cannot handle objects such as written by Joe in Makefile.driyce.js (see below).
The net result being that it is right now not possible to build ace, as far as I can see.
Would appreciate help.
Regards,
Joop

copy({
    source: [
        {                                         //Joop: dryice@0.3.1 does not handle objects.
            project: project,
            require: options.requires
        }
    ],
    filter: [ copy.filter.moduleDefines ],
    dest: ace
});
Member

joewalker commented Feb 18, 2012

A number of people have confirmed that my fix worked, so maybe something else has changed to bring the problem back, or your situation is different in some way.
Could you check to see if you might have more than one dryice installed? I have a feeling npm could be doing you a disservice.

Hmmm,
I have:

joop@joop-laptop:~/Code/ace/node_modules$ ls -l
total 8
drwxr-xr-x 4 joop joop 4096 2012-02-17 15:55 dryice
drwxr-xr-x 3 joop joop 4096 2012-02-17 15:59 mime

and

joop@joop-laptop:~/Code/ace/node_modules/dryice$ ls -l
total 52
drwxr-xr-x 3 joop joop 4096 2012-02-17 15:55 lib
-rw-r--r-- 1 joop joop 25755 2011-11-09 19:59 LICENSE.txt
drwxr-xr-x 4 joop joop 4096 2012-02-17 15:55 node_modules
-rw-r--r-- 1 joop joop 837 2011-11-09 19:59 package.json
-rw-r--r-- 1 joop joop 9771 2011-11-09 19:59 README.md

where less package.json comes up with:

{
"name": "dryice",
"description": "A CommonJS/RequireJS packaging tool for browser scripts",
"keywords": [ "build", "requirejs" ],
"version": "0.3.1",
"homepage": "https://github.com/mozilla/dryice",
etc.

nodejs is in /usr/bin. I have not installed packages globally, cannot find any other installation of dryice.
I've tried again:

joop@joop-laptop:/Code/ace$ npm uninstall dryice
joop@joop-laptop:
/Code/ace$ npm install dryice
And then checking package.json I find that it is now version 0.4.1.

Running make clean and make results in the same problem (Failed to find module: ../../../../../../unicode, etc).

To sum up: I get different behavior before and after removing dryice and installing version 0.4.1. So it seems that node is using the versions I install locally in ~/Code/ace/.

Thanks,

Joop

Hi all,

I debugged and solved the problem. I found a typo in dryice, file index.js, line 77:

Object.defineProperty(Location.prototype, 'dirname', {
get: function() {
return path.dirname(this.fulllname);
}
});

If you look closely, you'll see that 'fullname' is misspelled with three l's.
This property then returns "." as result and the rest follows.

I've never worked with GIT. I presume a pull request can be made, but really would appreciate it if someone would do the honors?

Thanks,

Joop

joewalker added a commit to joewalker/dryice that referenced this issue Feb 21, 2012

Member

joewalker commented Feb 21, 2012

Excellent work, thanks. Just pushed and published 0.4.2 with this fix.

You're welcome. Glad to be of help. I updated to 0.4.2 and everything works fine. Thanks.

@fjakobs fjakobs closed this Apr 6, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment