routify
routify copied to clipboard
After upgrading to 2.18.13 './plugins/rollup' is not defined by "exports"
Describe the bug
I was updating some dependencies and went from 2.18.12 to 2.18.13. When I started rollup the build failed with
[!] Error: Package subpath './plugins/rollup' is not defined by "exports" in /Users/john/projects/app-ui/node_modules/@roxi/routify/package.json
I then reinstalled 2.18.12 and it is working again. If this plugin export has moved I was unable to find it in the documentation and it should be a breaking change. If not, then there is a bug.
Reproduction
Update a svelte 3/4 app with rollup using import routify from '@roxi/routify/plugins/rollup'
in the rollup.config.js file to routify 2.18.13.
run rollup -c -w
and build should fail.
Dependencies used:
"dependencies": {
"@rollup/plugin-commonjs": "^19.0.1",
"@rollup/plugin-html": "^1.0.3",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.3.0",
"@roxi/routify": "^2.18.16",
"@silintl/ui-components": "^11.1.0",
"@tailwindcss/nesting": "^0.0.0-insiders.565cd3e",
"@tailwindcss/typography": "^0.5.12",
"@tsconfig/svelte": "^2.0.1",
"autoprefixer": "^10.4.19",
"concurrently": "^8.2.2",
"croppie": "^2.6.5",
"date-fns": "^2.30.0",
"iconify-icon": "^1.0.8",
"lodash-es": "^4.17.21",
"material-components-web": "^14.0.0",
"postcss": "^8.4.38",
"postcss-import": "^15.1.0",
"postcss-nesting": "^12.1.1",
"qs": "^6.12.0",
"rollup": "^2.79.1",
"rollup-plugin-dotenv": "^0.5.0",
"rollup-plugin-includepaths": "^0.2.4",
"rollup-plugin-livereload": "^2.0.5",
"rollup-plugin-polyfill-node": "^0.13.0",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-svelte": "^7.2.0",
"rollup-plugin-terser": "^7.0.2",
"svelte": "^3.55.1",
"svelte-preprocess": "^5",
"tailwind-utopia": "github:domchristie/tailwind-utopia",
"tailwindcss": "^3.4.3",
"typescript": "^4.9.4"
},
"devDependencies": {
"@rollup/plugin-typescript": "^8.5.0",
"@types/croppie": "^2.6.4",
"@types/gtag.js": "^0.0.19",
"@types/lodash-es": "^4.17.12",
"@types/node": "^16.11.6",
"@types/qs": "^6.9.14",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"eslint": "^7.32.0",
"eslint-plugin-svelte3": "^3.2.1",
"prettier": "3.2.5",
"prettier-plugin-svelte": "^3.2.2",
"prettier-plugin-tailwindcss": "0.5.13",
"rimraf": "^3.0.2",
"sirv-cli": "^2.0.2",
"svelte-check": "^2.9.0",
"tslib": "^2.6.2"
}
}
Logs
> build:dev
[0] > rollup -c -w
[0]
[0] [!] Error: Package subpath './plugins/rollup' is not defined by "exports" in /Users/john/projects/app-ui/node_modules/@roxi/routify/package.json
[0] Error: Package subpath './plugins/rollup' is not defined by "exports" in /Users/john/projects/app-ui/node_modules/@roxi/routify/package.json
[0] at new NodeError (node:internal/errors:400:5)
[0] at exportsNotFound (node:internal/modules/esm/resolve:361:10)
[0] at packageExportsResolve (node:internal/modules/esm/resolve:697:9)
[0] at resolveExports (node:internal/modules/cjs/loader:538:36)
[0] at Function.Module._findPath (node:internal/modules/cjs/loader:607:31)
[0] at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1025:27)
[0] at Function.Module._load (node:internal/modules/cjs/loader:885:27)
[0] at Module.require (node:internal/modules/cjs/loader:1105:19)
[0] at require (node:internal/modules/cjs/helpers:103:18)
[0] at Object.<anonymous> (/Users/mike/projects/app-ui/rollup.config.js:14:15)
System Info
Sorry, didn't feel like installing envinfo at the moment. npm: 8.19.3, node v18.13.0, macOS 14.4.1
Hardware Overview:
Model Name: Mac mini
Model Identifier: Macmini9,1
Model Number: Z12N000G0LL/A
Chip: Apple M1
Total Number of Cores: 8 (4 performance and 4 efficiency)
Memory: 16 GB
System Firmware Version: 10151.101.3
OS Loader Version: 10151.101.3
Activation Lock Status: Enabled
:tada: This issue has been resolved in version 2.18.17 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Thanks for the heads up. Please let me know if this has been fixed and I'll close this issue.
Thanks!
I'll check it tommorrow and let you know.
On Wed, Apr 3, 2024, 7:16 PM Jakob Rosenberg @.***> wrote:
Thanks for the heads up. Please let me know if this has been fixed and I'll close this issue.
— Reply to this email directly, view it on GitHub https://github.com/roxiness/routify/issues/549#issuecomment-2034084655, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ34VP3O6PVVWO5HH2GS3R3Y3PFYFAVCNFSM6AAAAABFUTLRLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZUGA4DINRVGU . You are receiving this because you authored the thread.Message ID: @.***>
After updating and changing the import to import routify from '@roxi/routify/plugins/rollup.js'
(no .js before) it is working fine. Thanks!