-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failure with 1.1.0 #7
Comments
Hi @davidgovea I see the problem the error I am trying to fix as soon as possible but the resolving of the tailwind config file is something different. I get the resolve problem and I was thinking to make my own command to generate a more optimised version of the config file and a specified path can be part of the command. For the moment I see this as a different issue and a little less pressing as it still works in most of the apps were there is control over the file-structure. If you find any solution feel free to shoot a PR for the but for now best to temporarely use greetings |
Hi @TVke -- I agree about the resolve issue (separate issue). For the workaround, I've also needed to lock down the version of tailwind used:
|
Looks like the error is upstream of jison generates a parser.js /// ...SNIP...
exports.parser = parser; // THIS is what tailwind uses
exports.Parser = parser.Parser;
exports.parse = function () { return parser.parse.apply(parser, arguments); };
// The rest is all CLI-mode sugar. The require(fs) breaks things in RN metro bundler
exports.main = function commonjsMain(args) {
if (!args[1]) {
console.log('Usage: '+args[0]+' FILE');
process.exit(1);
}
var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
return exports.parser.parse(source);
};
if (typeof module !== 'undefined' && require.main === module) {
exports.main(process.argv.slice(1));
}
} It looks like jison is pretty dead :( I'm looking into fixing it at the build-level (re-write |
Found a maintained jison build, and made a PR here: MoOx/reduce-css-calc#57 Will be doing more testing, but that removes the (unused) |
Thank you very much you are a hero. |
@TVke still broken for me in v1.1.1 😢
|
@guilherme-teodoro same here. @TVke - can you cut another version with tailwind locked to The current ❯ npm ls | grep tailwindcss
└─┬ react-native-tailwindcss@1.1.1
└─┬ tailwindcss@1.1.2
|
verre sorry guys I just saw your messages I ment to lock it at exactly hope it didn't cause to much troubles |
reduce-css-calc is patched! 😃 |
Nice! And since tailwind specifies So now a fresh install of |
Looks like tailwind 1.1.0 started depending on reduce-css-calc, which assumes node & depends on fs
Edit: Confirmed that this happens on a freshly-generated "blank" project from expo-cli (both typescript and javascript). Let me know if there's anything else I can do to assist with reproducing.
So.. what should be done here? I've run into some unrelated problems with
require()
ing the tailwind config at build-time.. like when shipping Electrode Native "miniapps" -- the path assumption of../../../tailwind.config
doesn't work in those novel cases. I simply maintain a hardcoded patched versions for those.. not saying the library needs to adjust around these usecases.But is there value to "precompiling" the tailwind stylesheet? Could be one approach to deal with these assumptions inside the
tailwindcss
library..The text was updated successfully, but these errors were encountered: