panosoft / node-chartist

SVG Charts on the server.
The Unlicense
83 stars 20 forks source link

Error while installing. bad touch #2

Closed prashcr closed 8 years ago

prashcr commented 8 years ago

I guess you were expecting a node_modules folder under node_modules/node-chartist, as was the case with npm2.

Though, I'm not quite sure what the purpose of touching an empty file is.

bad touch!
/Users/prashanthcr/code/uhoo/charts/node_modules/touch/bin/touch.js:28
      throw er
      ^

Error: ENOENT: no such file or directory, open './node_modules/canvas.js'
    at Error (native)
alexgig commented 8 years ago

Hello @prashcr,

Thanks for opening this issue.

What versions of node and npm are you using to install node-chartist?

Best, Alex

prashcr commented 8 years ago

I'm using node 5.3 and npm 3.5.2

alexgig commented 8 years ago

Thanks @prashcr.

At this point we are targeting support for the current LTS version of node (v4) and the version of npm included with it (v2).

The touch creates a stub canvas module which jsdom requires in order to be browserified for non-browser environments. In order to create that stub, certain assumptions must be made as to the node_modules directory structure which underwent a breaking change from npm 2 -> 3.

Once the next LTS version of node is released, this will be updated to be compatible with whatever version of npm is packaged alongside it.

prashcr commented 8 years ago

Ah, fair enough.

Would it make sense to include npm@2.x as a peer dependency then? Since I happened to try using it with 4.0 as well, but with an upgraded npm.

alexgig commented 8 years ago

Hi @prashcr,

That's a great suggestion. We'll add an entry to the engines field of the pacakge.json to indicate which versions of npm are compatible with this module.

Thanks, Alex

alexgig commented 8 years ago

Hi @prashcr,

The pacakge.json engines field is up to date in v0.2.6.

Thanks again.

Best regards, Alex

alexgig commented 8 years ago

Hi @prashcr,

Just wanted to let you know that + node-chartist@0.2.8 is now compatible with npm 3.

Best, Alex