Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprite image and style does not generated #72

Open
hilo2120 opened this issue Sep 14, 2018 · 1 comment
Open

Sprite image and style does not generated #72

hilo2120 opened this issue Sep 14, 2018 · 1 comment

Comments

@hilo2120
Copy link

Here is my code:

var nsg = require('node-sprite-generator');
  nsg({
      src: ['images/1.jpg',
        'images/2.jpg',
        'images/3.jpg'
      ],
      spritePath: 'sprite.png',
      stylesheetPath: 'sprite.css',
      stylesheet: 'css'
  }, function (err) {
      console.log('Sprite generated!');
  });

When i run it using node sprite.js It says "Sprite generated!" but nothing happens, there is no sprite.png and no sprite.css!
I'm using vscode internal terminal.

@m0o0scar
Copy link

m0o0scar commented Apr 3, 2019

I encounter similiar issue, printing the error object of the callback function shows:

TypeError: expecting a function but got [object Null]
    at apiRejection (/.../node_modules/bluebird/js/release/promise.js:10:27)
    at map (/.../node_modules/bluebird/js/release/map.js:136:16)
    at Promise.map (/.../node_modules/bluebird/js/release/map.js:160:12)
    at generateSprite (/.../node_modules/node-sprite-generator/lib/spriteGenerator.js:74:10)
    at generateSpriteNode (/.../node_modules/node-sprite-generator/lib/index.js:15:12)
    at Object.<anonymous> (/.../scripts/spritesheet.js:17:1)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants