twolfson / gulp.spritesmith

Convert a set of images into a spritesheet and CSS variables via gulp
The Unlicense
1.08k stars 81 forks source link

I get error message: "Cannot define property:39, object is not extensible" #60

Closed halmai closed 9 years ago

halmai commented 9 years ago

When I run my favourite gulp task then I get the following erorr message:

y:\projects\emv\git\web-src\node_modules\gulp-spritesmith\node_modules\spritesmith\node_modules\gmsmith\node_modules\temporary\lib\detector.js:26
  var last = Array.prototype.pop.apply(path);
                                 ^
TypeError: Cannot define property:39, object is not extensible.
    at normalize (y:\projects\emv\git\web-src\node_modules\gulp-spritesmith\node_modules\spritesmith\node_modules\gmsmith\node_modules\temporary\lib\detector.js:26:34)
    at Object.detector.tmp (y:\projects\emv\git\web-src\node_modules\gulp-spritesmith\node_modules\spritesmith\node_modules\gmsmith\node_modules\temporary\lib\detector.js:46:10)
    at Object.generator.build (y:\projects\emv\git\web-src\node_modules\gulp-spritesmith\node_modules\spritesmith\node_modules\gmsmith\node_modules\temporary\lib\generator.js:45:27)
    at File.Base.init (y:\projects\emv\git\web-src\node_modules\gulp-spritesmith\node_modules\spritesmith\node_modules\gmsmith\node_modules\temporary\lib\base.js:31:28)
    at new File (y:\projects\emv\git\web-src\node_modules\gulp-spritesmith\node_modules\spritesmith\node_modules\gmsmith\node_modules\temporary\lib\file.js:23:8)
    at Object.createCanvas (y:\projects\emv\git\web-src\node_modules\gulp-spritesmith\node_modules\spritesmith\node_modules\gmsmith\lib\gmsmith.js:96:21)
    at generateCanvas (y:\projects\emv\git\web-src\node_modules\gulp-spritesmith\node_modules\spritesmith\src\smith.js:124:16)
    at fn (y:\projects\emv\git\web-src\node_modules\gulp-spritesmith\node_modules\async\lib\async.js:582:34)
    at Immediate._onImmediate (y:\projects\emv\git\web-src\node_modules\gulp-spritesmith\node_modules\async\lib\async.js:498:34)
    at processImmediate [as _immediateCallback] (timers.js:367:17)

The relevant part from gulpfile.js is:

gulp.src('.tmp/images/**/*.png')
    .pipe(spritesmith({
        imgName: 'sprite.png',
        cssName: 'sprite.css',
    }))
    .pipe(gulp.dest('build/images'));

Version numbers: gulp-spritesmith": "0.0.2"

$ node -v
v0.12.7    

$ npm -v
2.11.3

Could anyone help me how I could fix this, please? Thanks,

Csongor

twolfson commented 9 years ago

This repository is gulp.spritesmith not gulp-spritesmith. It looks like you installed/are using the gulp-spritesmith version =/

halmai commented 9 years ago

Argh, yes, sorry. This similarity is really confusing but you are right, it is another module. Yours works fine. :) Thanks.

twolfson commented 9 years ago

Glad everything worked out =)