stylis-plugin-rtl
stylis-plugin-rtl copied to clipboard
Source-map file not found
I get this warning during Webpack build:
WARNING in ./node_modules/stylis-plugin-rtl/dist/stylis-rtl.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '...\node_modules\stylis-plugin-rtl\src\stylis-rtl.ts' file: Error: ENOENT: no such file or directory, open '...\node_modules\stylis-plugin-rtl\src\stylis
-rtl.ts'
It expects to find the source-map file in the src folder. But it hasn't been published on NPM.
https://unpkg.com/browse/[email protected]/

I use [email protected].
The same issue here:
WARNING in ./node_modules/stylis-plugin-rtl/dist/stylis-rtl.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'D:\vah\projects\SAJ\node_modules\stylis-plugin-rtl\src\stylis-rtl.ts' file: Error: ENOENT: no such file or directory, open 'D:\vah\projects\SAJ\node_modules\stylis-plugin-rtl\src\stylis-rtl.ts'
@ ./src/layouts/RTL.js 4:0-42 11:18-27
@ ./src/App.js 9:0-32 13:30-33
@ ./src/index.js 5:0-24 9:29-32
Steps to reproduce: 1.
npm install stylis stylis-plugin-rtl
Make RTL component like below:
import rtlPlugin from 'stylis-plugin-rtl';
import { CacheProvider } from '@emotion/react';
import createCache from '@emotion/cache';
// Create rtl cache
const cacheRtl = createCache({
key: 'muirtl',
stylisPlugins: [rtlPlugin],
});
export default function RTL(props) {
return <CacheProvider value={cacheRtl}>{props.children}</CacheProvider>;
}
- Wrap the root of my project with the RTL component:
<RTL>
<ThemeProvider>
<...>
</ThemeProvider>
</RTL>
I have the same problem, any solutions?
can you please provide a solution for this?
can you please provide a solution for this?
In my case, I downgraded the version and it worked.
can you please provide a solution for this?
In my case, I downgraded the version and it worked.
I understand that, but in the version you installed what is the difference between it and this new version that made it without source-map files? If so I can open a PR for this to be fixed.
I'm experiencing the same issue and was also wondering how to fix it without needing to downgrade (causes other issues in my project).
Would be great to see this fixed
same issue here

I have same issue too
Is this project not maintained? Same issue here
firstly, remove or uninstall stylis-plugin-rtl with npm or yarn:
yarn remove stylis-plugin-rtl
npm uninstall stylis-plugin-rtl
secondly, install [email protected] with npm or yarn:
yarn add [email protected]
npm i [email protected]
Any updates on this?
This package is relatively famous:

I hope it will be solved :) It'll help a lot of developers.
I'm having the same issue on pnpm with turborepo after installing "stylis-plugin-rtl": "^2.1.1":

Really shit , we are in 2023 and this type of problems still exist ?!!
You can take a look at my comment here: https://github.com/styled-components/stylis-plugin-rtl/issues/33#issuecomment-1458148783
any update?!!
I found a fix for it and it worked for me:
- remove node modules
- npm install
- add .env file beside src folder and add this line to it: GENERATE_SOURCEMAP=false
- npm start
Here is how is my env looks like:
I found a fix for it and it worked for me:
* remove node modules * npm install * add .env file beside **src** folder and add this line to it: GENERATE_SOURCEMAP=false * npm startHere is how is my env looks like:
Great. Thanks to you brother.
add .env file beside src folder and add this line to it: GENERATE_SOURCEMAP=false npm start
