-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
stylis-plugin-rtl + source-map-loader = breakage #33
Comments
I am getting the same warning as well as shown below: WARNING in ./node_modules/stylis-plugin-rtl/dist/stylis-rtl.js |
@fadijabi I have the same problem 🥲 |
the same too |
same error here...
|
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 |
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] |
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 |
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
Thats it !! re-run the project. |
I have same problem on v.2.1.1 |
I have the same problem, on v.2.1.1 |
firstly, remove or uninstall
secondly, install
|
That works for me. |
Maybe your solution will work |
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? |
Yeah it seems the last commit was on Dec 15, 2021 :( @hitendramalviya |
If anyone want to fix it easily, you can use patch-package with this patch: diff --git a/node_modules/stylis-plugin-rtl/.DS_Store b/node_modules/stylis-plugin-rtl/.DS_Store
new file mode 100644
index 0000000..e69de29
diff --git a/node_modules/stylis-plugin-rtl/dist/cjs/stylis-rtl.d.ts b/node_modules/stylis-plugin-rtl/dist/cjs/stylis-rtl.d.ts
index e3efd93..ac86e86 100644
--- a/node_modules/stylis-plugin-rtl/dist/cjs/stylis-rtl.d.ts
+++ b/node_modules/stylis-plugin-rtl/dist/cjs/stylis-rtl.d.ts
@@ -1,5 +1,5 @@
import { Middleware } from 'stylis';
-declare type MiddlewareParams = Parameters<Middleware>;
+type MiddlewareParams = Parameters<Middleware>;
declare function stylisRTLPlugin(element: MiddlewareParams[0], index: MiddlewareParams[1], children: MiddlewareParams[2], callback: MiddlewareParams[3]): string | void;
export default stylisRTLPlugin;
//# sourceMappingURL=stylis-rtl.d.ts.map
\ No newline at end of file
diff --git a/node_modules/stylis-plugin-rtl/dist/cjs/stylis-rtl.d.ts.map b/node_modules/stylis-plugin-rtl/dist/cjs/stylis-rtl.d.ts.map
index 3edea57..e50c55a 100644
--- a/node_modules/stylis-plugin-rtl/dist/cjs/stylis-rtl.d.ts.map
+++ b/node_modules/stylis-plugin-rtl/dist/cjs/stylis-rtl.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"stylis-rtl.d.ts","sourceRoot":"","sources":["../../src/stylis-rtl.ts"],"names":[],"mappings":"AACA,OAAO,EAQL,UAAU,EAIX,MAAM,QAAQ,CAAC;AAEhB,aAAK,gBAAgB,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;AA4B/C,iBAAS,eAAe,CACtB,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC5B,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC1B,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC7B,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAC5B,MAAM,GAAG,IAAI,CAWf;AAMD,eAAe,eAAe,CAAC"}
\ No newline at end of file
+{"version":3,"file":"stylis-rtl.d.ts","sourceRoot":"","sources":["../../src/stylis-rtl.ts"],"names":[],"mappings":"AACA,OAAO,EAQL,UAAU,EAIX,MAAM,QAAQ,CAAC;AAEhB,KAAK,gBAAgB,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;AA4B/C,iBAAS,eAAe,CACtB,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC5B,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC1B,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC7B,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAC5B,MAAM,GAAG,IAAI,CAYf;AAMD,eAAe,eAAe,CAAC"}
\ No newline at end of file
diff --git a/node_modules/stylis-plugin-rtl/dist/cjs/stylis-rtl.js b/node_modules/stylis-plugin-rtl/dist/cjs/stylis-rtl.js
index 7eeb3d3..33b6846 100644
--- a/node_modules/stylis-plugin-rtl/dist/cjs/stylis-rtl.js
+++ b/node_modules/stylis-plugin-rtl/dist/cjs/stylis-rtl.js
@@ -37,4 +37,3 @@ function stylisRTLPlugin(element, index, children, callback) {
// is unused
Object.defineProperty(stylisRTLPlugin, 'name', { value: 'stylisRTLPlugin' });
exports.default = stylisRTLPlugin;
-//# sourceMappingURL=stylis-rtl.js.map
\ No newline at end of file
diff --git a/node_modules/stylis-plugin-rtl/dist/cjs/stylis-rtl.js.map b/node_modules/stylis-plugin-rtl/dist/cjs/stylis-rtl.js.map
deleted file mode 100644
index 0af053c..0000000
--- a/node_modules/stylis-plugin-rtl/dist/cjs/stylis-rtl.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"stylis-rtl.js","sourceRoot":"","sources":["../../src/stylis-rtl.ts"],"names":[],"mappings":";;;;;AAAA,sDAAgC;AAChC,iCAYgB;AAIhB,SAAS,yBAAyB,CAChC,OAA4B,EAC5B,KAA0B,EAC1B,QAA6B;IAE7B,QAAQ,OAAO,CAAC,IAAI,EAAE;QACpB,KAAK,eAAM,CAAC;QACZ,KAAK,oBAAW,CAAC;QACjB,KAAK,gBAAO;YACV,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;QAC5D,KAAK,gBAAO,CAAC,CAAC;YACZ,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC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AAW,CAAC,CAAC,CAAC,IAAA,gBAAO,EAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QAEvE,OAAO,CAAC,MAAM,GAAG,EAAE,CAAC;KACrB;AACH,CAAC;AAED,qFAAqF;AACrF,YAAY;AACZ,MAAM,CAAC,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC,CAAC;AAE7E,kBAAe,eAAe,CAAC"}
\ No newline at end of file
diff --git a/node_modules/stylis-plugin-rtl/dist/stylis-rtl.d.ts b/node_modules/stylis-plugin-rtl/dist/stylis-rtl.d.ts
index e3efd93..ac86e86 100644
--- a/node_modules/stylis-plugin-rtl/dist/stylis-rtl.d.ts
+++ b/node_modules/stylis-plugin-rtl/dist/stylis-rtl.d.ts
@@ -1,5 +1,5 @@
import { Middleware } from 'stylis';
-declare type MiddlewareParams = Parameters<Middleware>;
+type MiddlewareParams = Parameters<Middleware>;
declare function stylisRTLPlugin(element: MiddlewareParams[0], index: MiddlewareParams[1], children: MiddlewareParams[2], callback: MiddlewareParams[3]): string | void;
export default stylisRTLPlugin;
//# sourceMappingURL=stylis-rtl.d.ts.map
\ No newline at end of file
diff --git a/node_modules/stylis-plugin-rtl/dist/stylis-rtl.d.ts.map b/node_modules/stylis-plugin-rtl/dist/stylis-rtl.d.ts.map
index f091310..1d49d45 100644
--- a/node_modules/stylis-plugin-rtl/dist/stylis-rtl.d.ts.map
+++ b/node_modules/stylis-plugin-rtl/dist/stylis-rtl.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"stylis-rtl.d.ts","sourceRoot":"","sources":["../src/stylis-rtl.ts"],"names":[],"mappings":"AACA,OAAO,EAQL,UAAU,EAIX,MAAM,QAAQ,CAAC;AAEhB,aAAK,gBAAgB,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;AA4B/C,iBAAS,eAAe,CACtB,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC5B,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC1B,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC7B,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAC5B,MAAM,GAAG,IAAI,CAWf;AAMD,eAAe,eAAe,CAAC"}
\ No newline at end of file
+{"version":3,"file":"stylis-rtl.d.ts","sourceRoot":"","sources":["../src/stylis-rtl.ts"],"names":[],"mappings":"AACA,OAAO,EAQL,UAAU,EAIX,MAAM,QAAQ,CAAC;AAEhB,KAAK,gBAAgB,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;AA4B/C,iBAAS,eAAe,CACtB,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC5B,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC1B,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC7B,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAC5B,MAAM,GAAG,IAAI,CAYf;AAMD,eAAe,eAAe,CAAC"}
\ No newline at end of file
diff --git a/node_modules/stylis-plugin-rtl/dist/stylis-rtl.js b/node_modules/stylis-plugin-rtl/dist/stylis-rtl.js
index 513e600..3e341c3 100644
--- a/node_modules/stylis-plugin-rtl/dist/stylis-rtl.js
+++ b/node_modules/stylis-plugin-rtl/dist/stylis-rtl.js
@@ -32,4 +32,3 @@ function stylisRTLPlugin(element, index, children, callback) {
// is unused
Object.defineProperty(stylisRTLPlugin, 'name', { value: 'stylisRTLPlugin' });
export default stylisRTLPlugin;
-//# sourceMappingURL=stylis-rtl.js.map
\ No newline at end of file
diff --git a/node_modules/stylis-plugin-rtl/dist/stylis-rtl.js.map b/node_modules/stylis-plugin-rtl/dist/stylis-rtl.js.map
deleted file mode 100644
index e6561ca..0000000
--- a/node_modules/stylis-plugin-rtl/dist/stylis-rtl.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"stylis-rtl.js","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AkB,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC7G,CAAC;AAED,SAAS,eAAe,CACtB,OAA4B,EAC5B,KAA0B,EAC1B,QAA6B,EAC7B,QAA6B;IAE7B,IACE,OAAO,CAAC,IAAI,KAAK,SAAS;QAC1B,OAAO,CAAC,IAAI,KAAK,QAAQ;QACzB,CAAC,OAAO,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,EACnH;QACA,IAAM,WAAW,GAAG,QAAQ,CAAC,SAAS,CAAC,yBAAyB,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;QAC5F,OAAO,CAAC,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QAEvE,OAAO,CAAC,MAAM,GAAG,EAAE,CAAC;KACrB;AACH,CAAC;AAED,qFAAqF;AACrF,YAAY;AACZ,MAAM,CAAC,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC,CAAC;AAE7E,eAAe,eAAe,CAAC"}
\ No newline at end of file |
I have the same problem, on v.2.1.1 |
Installing v2.0.2 alone didn't work for me as I'm using React with TypeScript. The solution that worked for me is as follows:
|
i have the same error To ignore, add // eslint-disable-next-line to the line before. WARNING in ./node_modules/stylis-plugin-rtl/dist/stylis-rtl.js Any solution? |
Copying Files with a Postinstall Script Using a postinstall Script in package.json: { This script copies the files from the dist directory to the src directory when you run npm install or yarn install. |
worked for me, thanks |
The built source files and the sourcemaps of the library contains reference to the src/ directory:
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:
The text was updated successfully, but these errors were encountered: