stylis-plugin-rtl
stylis-plugin-rtl copied to clipboard
stylis-plugin-rtl + source-map-loader = breakage
The built source files and the sourcemaps of the library contains reference to the src/ directory:
{"version":3,"file":"stylis-rtl.js","sourceRoot":"","sources":["../src/stylis-rtl.ts"],"names":[]
But the actual src directory is not shipped with the package, thus ../src/stylis-rtl.ts
does not exist.
When using source-map-loader ( as with create react app 5), the build fails as it can't file stylis-rtl.ts
Possible solutions:
- Use inline source-maps
- Don't generate source-maps
- ship src as well
I am getting the same warning as well as shown below:
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' @ ./src/contexts/ThemeContext.js 9:0-42 22:18-27 @ ./src/index.js 13:0-63 17:61-81
@fadijabi I have the same problem 🥲
the same too
same error 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 '...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'
@ ./src/components/RtlLayout.tsx 4:0-42 22:48-57
@ ./src/App.tsx 8:0-47 18:37-46
@ ./src/index.tsx 15:0-24 22:39-42
I also have same problem
the same too
Same here
Getting the same
I also have same problem
same here. I forked a repo and ran npm install
and npm start
and then got this error.
What can I do to get rid of it?
Was also having this issue. I know it's not the best solution, but I was able to avoid these errors/warnings by reverting to stylis-plugin-rtl v1.
I have the same problem. Any Solutions?
npm i [email protected] solved for me...
is there any update on this issue? could someone find a solution except downgrading to previous versions (v1 and v2.0.2 and ...)
The same problem v.2.1.1
I have same problem on v.2.1.1 Any Solutions?
I have this error in my React project as well and would love to hear if anyone has the issue and has resolved it.
I have the same problem, any update
I am having the same problem since a long time, any updates please?
you can try to solve this warning with below steps. for me its working
- create .env file on root
- add this line : GENERATE_SOURCEMAP=false
Thats it !! re-run the project.
I have same problem on v.2.1.1 Any Solutions?
I have the same problem, on v.2.1.1
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]
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]
That works for me.
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]
Maybe your solution will work But I think going back to the old version is not a real solution We still waiting ...
I have the same issue here... Is there a scheduled solution in the roadmap?
It is because the .ts file is not supplied in dist or src. Placing it there manually will fix it
Seems this community is missing contributors, a year old issue is still open, and faced by many including me, I think they just need to publish the package without source map generated, would solve this problem for now.
Is this the same issue as #35?
Seems this community is missing contributors, a year old issue is still open, and faced by many including me, I think they just need to publish the package without source map generated, would solve this problem for now.
Yeah it seems the last commit was on Dec 15, 2021 :( @hitendramalviya