filamentgroup/glyphhanger

On fresh install (into a local project, not global install) command doesn't run because of missing dependency

jeremenichelli opened this issue · 5 comments

This happens on Node 8.9.4, using both npm and yarn.

After a fresh install and trying to run:

glyphhanger ./static/index.html  --subset=*.woff --formats=woff2,woff

I get this error:

(node:27594) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open '/Users/me/Desktop/my-project/node_modules/glyphhanger/node_modules/characterset/lib/characterset.js'

(node:27594) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Any idea what could be happening? Was something changed on some late release around the application bundling? I rolled back to previous patch version and got the same.

I also tried installing characterset as a dependency and got the same error.

Oh, interesting. It looks like I made a bad assumption about dependency file structure when installing it locally into a project 😱

Does global installation work ok?

What version of npm are you using?

I’ve duplicated this locally
image

  • npm version I was using when this happened was 5.6.0, not lastest but not super old. I think that this is related with the package not being published with the node_modules folder included nor bundle to work standalone.
  • Instally globally leads to the same error on my end.
  • I think that for some time npm and yarn stopped installing dependencies of the package you install automatically, sadly installing the package on my repository didn't work neither.

hey @zachleat, any update on this? Let me know if you'd like to talk about potential ways to fix this and need my collaboration. I don't want to just open a PR cause I don't know what plans the group has for the tool, but more than open to help :)

This will be included with 3.1.0—thanks for your patience!