Skip to content
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

Issue with fourseven:[email protected] and Internal Meteor Packages #324

Open
LionelGuerin opened this issue Feb 14, 2025 · 3 comments
Open

Comments

@LionelGuerin
Copy link

Describe the Bug
I'm using fourseven:scss with internal Meteor packages, and since version 5.0.0-alpha.1, I've encountered the following problem:

   While building for web.browser:
   /packages/testlocal_scss/client/style_test.scss: Scss compiler client/style_test.scss: no such file or directory

To Reproduce
I’ve created a project to reproduce this behavior, available here: https://github.com/LionelGuerin/meteor_forkedseven_scss

In the folder sass_tests/sass, I'm using fourseven:[email protected].

To reproduce the error, run the following commands:

git clone [email protected]:LionelGuerin/meteor_forkedseven_scss.git
cd meteor_forkedseven_scss/sass_tests/sass
meteor --port 4000

Expected behavior
In the folder sass_tests/sass_forked, there is another Meteor app that uses a slightly modified version of fourseven:[email protected].
This custom package is located in:
sass_tests/sass_forked/packages/forkedseven_scss

The only change made is on line 183, where filePath is replaced in the compileAsync function:

output = await sass.compileAsync(inputFile.getSourceRoot()+ "/" + inputFile.getPathInPackage(), options);
// output = await sass.compileAsync(inputFile.getPathInPackage(), options);

I’m pretty sure this isn’t the correct way to do it, but I don’t know how to fix it properly (and that's why I haven’t made a PR).

Thank you in advance for your time and help ! :)

Copy link

Thank you for submitting this issue!

We, the Members of Meteor Community Packages take every issue seriously.
Our goal is to provide long-term lifecycles for packages and keep up
with the newest changes in Meteor and the overall NodeJs/JavaScript ecosystem.

However, we contribute to these packages mostly in our free time.
Therefore, we can't guarantee your issues to be solved within certain time.

If you think this issue is trivial to solve, don't hesitate to submit
a pull request, too! We will accompany you in the process with reviews and hints
on how to get development set up.

Please also consider sponsoring the maintainers of the package.
If you don't know who is currently maintaining this package, just leave a comment
and we'll let you know

@illusionfield
Copy link

This is indeed a very possible issue. For some reason, I didn't consider that the package might be used without isImport.

api.addFiles('x.scss', 'client', { isImport: true });

Thanks for the detailed information! This makes it easy to investigate and fix the problem.

illusionfield added a commit to illusionfield/fourseven-scss that referenced this issue Feb 17, 2025
illusionfield added a commit to illusionfield/fourseven-scss that referenced this issue Feb 17, 2025
* master:
  Internal Meteor Packages: improve root file detection logic for imports and package files Meteor-Community-Packages#324
illusionfield added a commit to illusionfield/fourseven-scss that referenced this issue Feb 18, 2025
@illusionfield
Copy link

I have forked the test environment you created and extended it with additional variations to cover more possible use cases. Now, everything works flawlessly in all scenarios.

You can check it here:
https://github.com/illusionfield/meteor_forkedseven_scss

illusionfield added a commit to illusionfield/meteor-dart-sass-development that referenced this issue Feb 28, 2025
illusionfield added a commit to illusionfield/fourseven-scss that referenced this issue Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants