You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My setup is running Sass JS API from the Sass code fetched from Codemirror editor. The project is bundled using Vite, and I'm using the Svelte framework.
I've cleaned up the line breaks, but on sending Sass code with double-slash comments (//), it throws an error.
On running it by passing the string after removing line breaks, this is the error I get:
On trying to reproduce on different Typescript setups in online code editors (codesandbox, stackblitz, codepen), all of them just straight up fail with altogether another error Cannot read properties of undefined (reading 'isTTY'), but that's a different topic.
Is this error being caused by something in my setup bundling? Or can somebody else reproduce it at their end and is it a bug in the library code?
The text was updated successfully, but these errors were encountered:
Just realized that this error is happening because of removal of line breaks, causing comment to wrap onto the same line and everything else past that being commented (including the closing brace).
In which case, any suggestions/ideas as to how to handle line breaks in Sass string with comments?
My setup is running Sass JS API from the Sass code fetched from Codemirror editor. The project is bundled using Vite, and I'm using the Svelte framework.
I've cleaned up the line breaks, but on sending Sass code with double-slash comments (
//
), it throws an error.Code sass compilation usage:
where
sassCode
can be a string literal like:On running it by passing the string after removing line breaks, this is the error I get:
![image](https://private-user-images.githubusercontent.com/18551588/271020879-b8ec0854-52dc-4426-a320-2eb37991cff5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU3Nzk0NTMsIm5iZiI6MTcyNTc3OTE1MywicGF0aCI6Ii8xODU1MTU4OC8yNzEwMjA4NzktYjhlYzA4NTQtNTJkYy00NDI2LWEzMjAtMmViMzc5OTFjZmY1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA4VDA3MDU1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc4MjQyNTdjNTE5NTFmYzBhM2Q5MzkxZGZkMDM3NGYwZjJhOGE2ZGY3NjY1OGJhODNmNzAzNzhiYjhkOTFjNWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.C8Lhai9045WlMuhpJJdbVAN2yLhT9W6AphP3Zl86E-A)
On trying to reproduce on different Typescript setups in online code editors (codesandbox, stackblitz, codepen), all of them just straight up fail with altogether another error
Cannot read properties of undefined (reading 'isTTY')
, but that's a different topic.Is this error being caused by something in my setup bundling? Or can somebody else reproduce it at their end and is it a bug in the library code?
The text was updated successfully, but these errors were encountered: