 
           ;; FIXME: is "./lib/some-file.js":"some-package" allowed?
           ;; currently assumes its always a file in the package itself
-          (string? override)
+          (and (string? override)
+               (util/is-relative? override))
           (let [override-file
                 (-> (io/file package-dir override)
                     (.getCanonicalFile))]

            [entry entry-file]
            (or (reduce
                  (fn [_ entry]
                    (when-let [file (or (test-file package-dir entry)
                                        ;; some libs have main:"some/dir/foo" without the .js
                                        (test-file-exts npm package-dir entry))]

                      (reduced [entry file])))
                  nil

    (util/is-relative? require)
    (find-relative npm require-from require)

    :else
    (let [require-from-pkg
          (when require-from ;; no overrides for entries
            (find-package-for-file npm require-from))

          browser-override
          (and require-from-pkg
               (get-in require-from-pkg [:browser-overrides require]))

          override
          (if (some? browser-override)
            browser-override
            (get node-libs-browser require))]

      (cond
        (nil? override)
        (find-package-require npm require)

        ;; "canvas": false
        (false? override)
        false

        (not (string? override))
        (throw (ex-info (format "invalid override in package: %s" require-from)
                 {:require require
                  :require-from require-from
                  :override override}))

        ;; jsdom
        ;; "contextify": "./lib/jsdom/contextify-shim.js"
        ;; overrides a package require from within the package to a local file
        (util/is-relative? override)
        (find-relative npm (:package-dir require-from-pkg) override)

        ;; "foo":"bar"
        ;; swap one package with the other
        :else
        (find-package-require npm override)
        ))))
