sanity-io / example-company-website-gatsby-sanity-combo

This is an example company website using Gatsby and Sanity in combination.
https://example-company-website-gatsby-sanity-combo.now.sh
MIT License
274 stars 142 forks source link

Gatsby - Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './is-truthy' is not defined by "exports" in.. #493

Closed judepark closed 1 year ago

judepark commented 1 year ago

Describe the bug I tried to create a new gatsby website from a repo and tried to develop it, but now am having issues with some "is-truthy" not being defined in my exports

To Reproduce Steps to reproduce the behavior:

  1. command "gatsby develop" on existing project that used to work seamlessly, but now I see this error message:
  2. Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './is-truthy' is not defined by "exports"

Expected behavior I expect my old projects or even commands like "gatsby -v" to run, but now can't due to this error message.

Screenshots internal/modules/cjs/loader.js:497 throw new ERR_PACKAGE_PATH_NOT_EXPORTED(basePath, mappingKey); ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './is-truthy' is not defined by "exports" in C:\Users\jude\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\gatsby-core-utils\package.json at applyExports (internal/modules/cjs/loader.js:497:9) at resolveExports (internal/modules/cjs/loader.js:513:23) at Function.Module._findPath (internal/modules/cjs/loader.js:641:31) at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1016:27) at Function.Module._load (internal/modules/cjs/loader.js:898:27) at Module.require (internal/modules/cjs/loader.js:1089:19) at require (internal/modules/cjs/helpers.js:73:18) at Object. (C:\Users\jude\AppData\Roaming\npm\node_modules\gatsby-cli\lib\reporter\reporter.js:34:17) at Module._compile (internal/modules/cjs/loader.js:1200:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10) { code: 'ERR_PACKAGE_PATH_NOT_EXPORTED' } Desktop (please complete the following information):

Additional context new to coding, kinda panicking that I can't work on my old projects anymore

monixm commented 1 year ago

did you manage to solve it? if so, how?