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

minify error with uglifyjs #218

Closed
gmoulin opened this Issue Mar 26, 2013 · 7 comments

Comments

3 participants

gmoulin commented Mar 26, 2013

Hello, I get this error while trying to compile a csp minified build.

Lodash version 1.1.0

I use :

sudo lodash csp -m

Compressing lodash.custom.min using UglifyJS...
Error: Cannot find module '/usr/lib/node_modules/lodash/vendor/uglifyjs/tools/node.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Minify.uglify (/usr/lib/node_modules/lodash/build/minify.js:448:22)
at Minify.onClosureAdvancedGzip (/usr/lib/node_modules/lodash/build/minify.js:573:14)
at Gzip.onEnd (zlib.js:166:5)
at Gzip.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:872:14
at process._tickCallback (node.js:415:13)

In /usr/lib/node_modules/lodash/vendor/uglifyjs/ I only have an empty lib folder and a LICENSE file.
I tried to delete the uglifyjs folder, same result.
I reinstalled lodash, same result.

Owner

jdalton commented Mar 26, 2013

@kitcambridge is on the case!

Contributor

kitcambridge commented Mar 26, 2013

It looks like the gzip decompression succeeds, but tar.Extract doesn't actually handle the piped stream. Node v0.10 implemented "Streams2," but they're backward-compatible (at least our usage is; there's one edge case that doesn't apply to us). The fact that you're experiencing this issue with v0.8 is puzzling, too.

Owner

jdalton commented Mar 26, 2013

@kitcambridge Can you sanity check me. Node 0.8.20 is here and then install npm install -g lodash@1.0.1 (uninstall previous ones) and then do something like sudo lodash.

Contributor

kitcambridge commented Mar 26, 2013

@jdalton Hmm, both Closure Compiler and UglifyJS downloaded successfully for me on v0.8.20—and I was able to create a minified custom build.

Owner

jdalton commented Mar 26, 2013

Ah, yap, I checked back and it did eventually download. So back to thinking it's a Node 0.10.0 thing.

@jdalton jdalton closed this in 51fbb0b Mar 27, 2013

gmoulin commented Mar 27, 2013

I retried this morning, same problem.
Manually downloading uglifyjs with the provided command worked.

Owner

jdalton commented Mar 27, 2013

I haven't bumped yet. It's fixed on edge.

@jdalton jdalton added a commit that referenced this issue Aug 29, 2013

@jdalton jdalton Update vendor/tar for Node v0.10.0+. [closes #218]
Former-commit-id: 9b35d27127dbd85dd56808e50bf255bbd3413c62
73d9a28

@jdalton jdalton added a commit that referenced this issue Sep 1, 2013

@jdalton jdalton Update vendor/tar for Node v0.10.0+. [closes #218]
Former-commit-id: 9b35d27127dbd85dd56808e50bf255bbd3413c62
736919e

@jdalton jdalton added a commit that referenced this issue Sep 25, 2014

@jdalton jdalton Update vendor/tar for Node v0.10.0+. [closes #218]
Former-commit-id: 9b35d27127dbd85dd56808e50bf255bbd3413c62
2c7cc2c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment