chiubaka / generator-chiubaka-typescript-package

Yeoman generator for standard Chiubaka Technologies TypeScript packages for libraries and other such things.
1 stars 0 forks source link

Cannot find module 'isbinaryfile' #4

Open chiubaka opened 2 years ago

chiubaka commented 2 years ago
 FAIL  src/node-module/NodeModuleGenerator.test.ts
  NodeModuleGenerator
    ✕ creates a package.json file (280 ms)

  ● NodeModuleGenerator › creates a package.json file

    Cannot find module 'isbinaryfile' from '/Users/dchiu/Developer/generator-typescript-package/.yarn/__virtual__/yeoman-environment-virtual-159b0d0798/0/cache/yeoman-environment-npm-3.9.1-6ff00ff453-60a19b9962.zip/node_modules/yeoman-environment/lib/util'

    Require stack:
      .yarn/__virtual__/yeoman-environment-virtual-159b0d0798/0/cache/yeoman-environment-npm-3.9.1-6ff00ff453-60a19b9962.zip/node_modules/yeoman-environment/lib/util/binary-diff.js
      .yarn/__virtual__/yeoman-environment-virtual-159b0d0798/0/cache/yeoman-environment-npm-3.9.1-6ff00ff453-60a19b9962.zip/node_modules/yeoman-environment/lib/util/conflicter.js
      .yarn/__virtual__/yeoman-environment-virtual-159b0d0798/0/cache/yeoman-environment-npm-3.9.1-6ff00ff453-60a19b9962.zip/node_modules/yeoman-environment/lib/environment.js
      .yarn/__virtual__/yeoman-test-virtual-d24845de57/0/cache/yeoman-test-npm-6.3.0-cf0e4ba284-7d8e79fadd.zip/node_modules/yeoman-test/lib/index.js
      src/node-module/NodeModuleGenerator.test.ts

      at resolveSync (.yarn/cache/resolve-patch-46f9469d0d-5656f4d0be.zip/node_modules/resolve/lib/sync.js:111:15)

I have found that installing isbinaryfile as a dev dependency in my package resolves the error, but it feels like I shouldn't have to do that :/. Feels like yeoman-environment should be including isbinaryfile as a dependency so that it gets pulled in when I install yeoman-environment. I opened an issue with them to this effect: https://github.com/yeoman/environment/issues/420

chiubaka commented 2 years ago

For now I'm going to go ahead and install isbinaryfile as a dev dependency so I can keep moving.

chiubaka commented 1 year ago

I'd guess that this has something to do with my Yarn 3 PnP set up. I don't think this is going to get fixed anytime soon, nor do I think it's really a high priority.