#Package subpath './tailwind' is not defined by
1 messages · Page 1 of 1 (latest)
seems like there are some issues for windows machines, i need to investigate this
did u follow the https://flowbite-react.com/docs/getting-started/quickstart after upgrading?
or check the release changes
Minor Changes
#1498 169b5dd Thanks @SutuSebastian! - ## Summary
This release brings massive improvements to Flowbite React's capabilities, introducing the first automatic Tailwind CSS class g...
well i still try to use the old tailwind 3 config but I guess it's obsolete now. (was working with 0.10.x)
okay will try it
one more question what does that patch command do added to postbuild?
when in doubt, always consolidate the docs please, https://flowbite-react.com/docs/getting-started/cli#flowbite-react-patch
it exposes the tailwind version in a .js file for maximum bundler compatibility, and allowing the library to work hybrid for both v3 and v4
we're not modifying the tailwindcss library or behaviour in any way, we're just exposing the version better
this work is only done because we want to support both Tailwind CSS v3 and v4
if in the future we'll drop hybrid support, this command will fade away
okay i followed all the instructions and migration is all good now
except when I build my next.js project (after only flowbite--react 0.11.x upgrade) i get the following error
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './version.js' is not defined by "exports" in /home/runner/work/wowtrack.gg/wowtrack.gg/frontend/node_modules/tailwindcss/package.json
i'm not sure if this is related to tailwind or flowbite-react
after a fresh install (by removing all node_modules) getting this strange error: Could not resolve Tailwind CSS module path. Skipping version patch.
The error is because the flowbite-react patch was not done (or successful), i’ll have to check for the last error
Are u on windows?
And one what package manager are u using? (Eg: npm, yarn, pnpm, bun)
yes on windows and using npm
pushed a fix now, could u try again? make sure to init the @latest version (0.11.7)
npx flowbite-react@latest init or npx flowbite-react@latest patch
okay will check it again
still getting the error but the thing is that im not getting this error in windows now but github ci
windows part seems be okay
> npm run lint --prefix common && npm run lint --prefix frontend
> [email protected] lint
> npm install && eslint
> [email protected] postinstall
> cd .. && npx husky common/.husky
up to date, audited 560 packages in 2s
161 packages are looking for funding
run `npm fund` for details
1 moderate severity vulnerability
To address all issues, run:
npm audit fix
Run `npm audit` for details.
> [email protected] lint
> next lint
node:internal/modules/esm/resolve:314
return new ERR_PACKAGE_PATH_NOT_EXPORTED(
^
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './version.js' is not defined by "exports" in /home/runner/work/fveri.com/fveri.com/frontend/node_modules/tailwindcss/package.json
at exportsNotFound (node:internal/modules/esm/resolve:314:10)
at packageExportsResolve (node:internal/modules/esm/resolve:661:9)
at resolveExports (node:internal/modules/cjs/loader:639:36)
at Function._findPath (node:internal/modules/cjs/loader:728:31)
at Function.<anonymous> (node:internal/modules/cjs/loader:1211:27)
at /home/runner/work/fveri.com/fveri.com/frontend/node_modules/next/dist/server/require-hook.js:55:36
at Function._load (node:internal/modules/cjs/loader:1055:27)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
at Module.<anonymous> (node:internal/modules/cjs/loader:1311:12) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}```
also on windows i now got this error after upgrading to 0.11.7
Done Could not resolve Tailwind CSS module path. Skipping version patch.
tried a fresh install on windows
λ rm -fr node_modules\
E:\source\wowtrack.gg\frontend (feature/flowbite-react-0.11 -> origin)
λ npm install
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
> [email protected] postinstall
> cd .. && npx husky frontend/.husky && flowbite-react patch
Could not resolve Tailwind CSS module path. Skipping version patch.```
interesting, i'll dig some more
if the error message instead included the exception, we would have more info
I know where its failing, I just need to find a workaround
i can help you with testing the workarounds etc if needed
Yes please, that would be very awesome of u
did this get resolved, is there a pre-release version can use. Also getting
Or can we manually create the version.js file int he meantime and what shoud be in it
Ure getting this because the patch script failed, and it only happens in Windows machines, also Yarn PnP has issues because it saves node modules in zip cache
i am using it through WSL2 so it's a linux machine really in heart
Still Windows at core
Also, creating that file urself would be redundant because the next time u run npm i it will get wiped
Thats why it needs patching on postinstall script
any updates?
Working on it, trying different approaches that do not include patching any node module
But rather update ur local code with the correct config values based on installed tailwindcss version
still valid?
yep
try this:
- copy into project
npm i ./flowbite-react-0.11.7.tgz
Also, remove the postinstall flowbite-react patch script from package.json file
okay ill try
from the package.json right?
didn't understand the last step
yep
okay just tested in a new branch
it seems all good now and error seems to be gone
to make sure i'll clean all my node-modules and .next cache
and retry
also my github ci is building it to see if everything is okay
ye it seems all good
Good
i should expect this to get included in next minor release?
any ETA on this?
still looking for the release with the fix
It's gonna be out soon
I'm still struggling with the migration scripts, its really hard to make them work for all supported Frameworks and bundlers
I can push it now/today, but then the release changelogs will have a "Breaking changes" section, because of no automatic migration
It will be a minor release, so 0.12.0
yo
okay i guess this will never get fixed and i have to use a patched version. i don't understand why windows builds are not deserving a fix.
nearly 3 months since reported
It is not about windows, but rather Yarn PnP
I’ll resume work on this issue as soon as I get some free time on my hands
it's done.