Dependent Package Not Found


#1

From https://npm.runkit.com/@kingjs/packages I run:

var assertThrows = require("@kingjs/assert-throws")

Which unexpectedly fails with “Error: Cannot find module ‘@kingjs/assert’”

@kingjs/packages depends on:

  • @kingjs/assert and
  • @kingjs/assert-throws

@kingjs/assert-throws requires but does not include it in it’s list of dependencies:

  • @kingjs/assert

I figured when @kingjs/assert-throws tried to load @kingjs/assert it would succeed because @kingjs/packages depended on it. But didn’t work…


#2

Unfortunately I’m unable to replicate the behavior you saw because @kingjs/packages has a reference error immediately after the requires resolve:

https://runkit.com/me1000/5b6368c4d9644e00126362cc

- Randy