roxiness / routify

Automated Svelte routes
https://routify.dev
1.88k stars 88 forks source link

'./lib/utils/config' is not defined by "exports" Error #559

Open rishi-gurjar opened 1 month ago

rishi-gurjar commented 1 month ago

Describe the bug

When I try to npm run build my app it throws an error related to Routify. I attempted to update Routify and Node but it did not work. I also cleared node_modules and ran npm i but it still did not work.

Reproduction

My rollup.config.js includes these lines: import getConfig from '@roxi/routify/lib/utils/config' const { distDir } = getConfig()

Logs

[!] Error: Package subpath './lib/utils/config' is not defined by "exports" in /Users/name/Documents/GitHub/cdj/node_modules/@roxi/routify/package.json
Error: Package subpath './lib/utils/config' is not defined by "exports" in /Users/name/Documents/GitHub/cdj/node_modules/@roxi/routify/package.json
    at new NodeError (node:internal/errors:387:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:365:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:649:3)
    at resolveExports (node:internal/modules/cjs/loader:556:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:596:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1014:27)
    at Function.Module._load (node:internal/modules/cjs/loader:873:27)
    at Module.require (node:internal/modules/cjs/loader:1100:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object.<anonymous> (/Users/rishigurjar/Documents/GitHub/cdj/rollup.config.js:13:17)

ERROR: "build:app" exited with 1.

System Info

System:
    OS: macOS 14.4.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 122.75 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.20.2 - ~/.nvm/versions/node/v16.20.2/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.19.4 - ~/.nvm/versions/node/v16.20.2/bin/npm
    pnpm: 8.15.4 - ~/.nvm/versions/node/v21.4.0/bin/pnpm
  npmPackages:
    @roxi/routify: ^2.18.17 => 2.18.17 
    svelte: ^3.31.0 => 3.59.2
github-actions[bot] commented 1 month ago

:tada: This issue has been resolved in version 2.18.18 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

jakobrosenberg commented 1 month ago

Hi @rishi-gurjar I'm closing this issue as resolved. If your issue isn't resolved, let me know and I'll reopen.