tinker / tinker-ui

7 stars 4 forks source link

Uglify missing dependency #8

Closed danactive closed 11 years ago

danactive commented 11 years ago

I'm blocked at the 'build' public script. I don't have uglify installed properly as line 73 fails "jsp.parse(js)". I tried installing via npm version 1 or 2 locally and globally. Any ideas?

npm install uglify-js@1

chiel commented 11 years ago

When you say you installed it locally, did you make sure to drop down into the tinker-ui directory? If you did, and there is a node_modules directory alongside the package.json I'm not quite sure what could be going wrong as I've never had an issue like this. If you could confirm that for me I'll have a think in the meantime about what could potentially be going wrong.

danactive commented 11 years ago

Yes, the node_modules folder contains "uglify-js"

danactive commented 11 years ago

Looks like your code is using the older version 1 of uglify. Did you know version 2 has been released?

If I remove the Uglify code then I'm able to compile 'build'.

chiel commented 11 years ago

Ah alright, I had a break from this project for about 3 months so I didn't really keep up with current affairs. I'll have a look at this later today and get back to you.

chiel commented 11 years ago

Also, could you post the output of npm list in your tinker-ui directory? Curious to see which versions of various packages you have installed. I'm thinking I need to tighten the screws on the versions in the package.json a bit, since that's something I've neglected to do so far since everything is still heavily under construction.

Either way, thanks for giving tinker-ui a shot, hope it'll work splendidly once you have it set up!

danactive commented 11 years ago

C:\Users\dan\github\tinker-api.js>npm list tinker-api@0.0.0 C:\Users\dan\github\tinker-api.js ├─┬ express@3.0.6 │ ├── buffer-crc32@0.1.1 │ ├── commander@0.6.1 │ ├─┬ connect@2.7.2 │ │ ├── bytes@0.1.0 │ │ ├── formidable@1.0.11 │ │ ├── pause@0.0.1 │ │ └── qs@0.5.1 │ ├── cookie@0.0.5 │ ├── cookie-signature@0.0.1 │ ├── debug@0.7.0 │ ├── fresh@0.1.0 │ ├── methods@0.0.1 │ ├── mkdirp@0.3.3 │ ├── range-parser@0.0.4 │ └─┬ send@0.1.0 │ └── mime@1.2.6 ├─┬ less@1.3.3 extraneous │ └── ycssmin@1.0.1 ├── prime@0.0.6 ├── uglify-js@1.3.4 extraneous └─┬ wrapup@0.10.3 extraneous ├── async@0.1.22 ├─┬ clint@0.0.6 │ └── prime@0.0.5-alpha ├── colors@0.6.0-1 ├─┬ graphviz@0.0.8 │ └── temp@0.4.0 ├── prime@0.0.6 └─┬ uglify-js@2.2.3 ├─┬ optimist@0.3.5 │ └── wordwrap@0.0.2 └─┬ source-map@0.1.8 └── amdefine@0.0.4

npm ERR! extraneous: uglify-js@1.3.4 C:\Users\dan\github\tinker-api.js\node_modu les\uglify-js npm ERR! extraneous: less@1.3.3 C:\Users\dan\github\tinker-api.js\node_modules\l ess npm ERR! extraneous: wrapup@0.10.3 C:\Users\dan\github\tinker-api.js\node_module s\wrapup npm ERR! not ok code 0

C:\Users\dan\github\tinker-api.js>

chiel commented 11 years ago

Yeah, based on this the culprit definitely seems to be uglify-js v2. I said I'd look into this yesterday but sadly I did not have time. I will have some time tonight though, sorry to keep you waiting!

Edit: Just noticed, I guess you're making some kinda tinker-api in js, your npm ls looks a lot longer than the one I have for my local copy:

$ npm ls
tinker-ui@0.0.1 /Users/chiel/src/tinker-client/ui
├─┬ less@1.3.3
│ └── ycssmin@1.0.1
├── prime@0.0.6 extraneous
├── uglify-js@1.3.4
└─┬ wrapup@0.9.12
  ├── clint@0.0.6
  ├── colors@0.6.0-1
  ├─┬ graphviz@0.0.8
  │ └── temp@0.4.0
  ├── prime@0.0.5-alpha
  └── uglify-js@1.2.6

Is tinker-ui a subdirectory of C:\Users\dan\github?

chiel commented 11 years ago

Just looking into the tinker-ui package.json, and it does have this listed: "uglify-js": "~1.3.3", meaning uglify should be installing a pre-2.0 version if you npm install in the tinker-ui directory. Your above output from npm ls confirms this, since it has installed 1.3.4. So I'm quite curious why this would not be working.

if you have time, could you clone tinker-ui into it's own directory, npm install inside that directory and then see if the build script works? I'm finding it weird that these versions of uglify are conflicting. Unless you have somehow installed a later version of uglify manually and that is now overriding the 1.3.4 that is supposed to be used by tinker's build scripts.

chiel commented 11 years ago

Since I haven't heard from you again, I'll assume this has been resolved and close the issue. Feel free to reopen if you're still having issues!