missing c:ldsUtils
Hello, I am missing a module, any idea?
N/A No MODULE named markup://c:ldsUtils found : [markup://c:showPdfRelatedToRecordId, markup://c:errorPanel]
Same here, did you manage to get it to work? @fabricepierre
Hello,
I could resolve this error. We have piece of code in https://github.com/trailheadapps/lwc-recipes/tree/master/force-app/main/default/lwc/ldsUtils
Please create LWC and incorporate the ldsUtil js and metadata file and then try to push code Org. it will get succeed.
Thank you, Harsha
Can you post your complete error in below link: Need to understand more, paste your code in GitHub.
https://github.com/annyhe/pdfViewer/issues/3
On Thu, Jul 16, 2020 at 9:21 PM Beelzebubdevelop [email protected] wrote:
I have same problem, @sharshaprasad https://github.com/sharshaprasad your fix don't work, this is error now: noDataErrorIllustration of type resourceUrl in file errorPanel.js
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/annyhe/pdfViewer/issues/3#issuecomment-659502170, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHNALOAOCHQXQGIZOHWTQGTR34OXPANCNFSM4ISM3QWA .
In the errorPanel.js file, the import statement referencing the idsUtils file has a typo (there is a "L" instead of an "i" - mixed capitalization for emphasis).
It reads: import { reduceErrors } from 'c/ldsUtils';
It should be: import { reduceErrors } from 'c/idsUtils';
Update the typo so that you reference the correct file. For example:
import { LightningElement, api, track } from 'lwc';
import { reduceErrors } from 'c/idsUtils';
export default class ErrorPanel extends LightningElement {
/** Generic / user-friendly message */
@api friendlyMessage = 'Error retrieving data';
...
It's very Simple to solve this error...............
Step1:- Create a LWC named "ldsUtils"
****Step2: Paste the Below Code as given in ldsUtils.js ****
/**
* Reduces one or more LDS errors into a string[] of error messages.
* @param {FetchResponse|FetchResponse[]} errors
* @return {String[]} Error messages
*/
export function reduceErrors(errors) {
if (!Array.isArray(errors)) {
errors = [errors];
}
return (
errors
// Remove null/undefined items
.filter((error) => !!error)
// Extract an error message
.map((error) => {
// UI API read errors
if (Array.isArray(error.body)) {
return error.body.map((e) => e.message);
}
// UI API DML, Apex and network errors
else if (error.body && typeof error.body.message === 'string') {
return error.body.message;
}
// JS errors
else if (typeof error.message === 'string') {
return error.message;
}
// Unknown error shape so try HTTP status text
return error.statusText;
})
// Flatten
.reduce((prev, curr) => prev.concat(curr), [])
// Remove empty strings
.filter((message) => !!message)
);
}
Step3: Don't make any changes in "ldsUtils.html" and "ldsUtils.js-meta.xml" files
Step4:Deploy the "ldsUtils" Component to your Org
Step5: After this deploy the component in which you mentioned "ldsUtils"as "import { reduceErrors } from 'c/ldsUtils';"
Step6: Hurray!! Your issue is resolved
Thanks and regards, Aman Anil Tiwari.
thanks for your solution , @amantiwari9619 . It worked like a charm!
Thanks @amantiwari9619 ! It worked for me.
Glad to hear from you 😁🤗
On Sun, Jan 31, 2021, 10:36 PM Muhammed Ali Siddiqui < [email protected]> wrote:
Thanks @amantiwari9619 https://github.com/amantiwari9619 ! It worked for me.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/annyhe/pdfViewer/issues/3#issuecomment-770414448, or unsubscribe https://github.com/notifications/unsubscribe-auth/APK6Z4IBTS3O7KISSMOFTCDS4WE2VANCNFSM4ISM3QWA .
Thanks @amantiwari9619 It worked for me.
\force-app\main\default\lwc-recipes\ldsUtils\ldsUtils.js: Could not infer a metadata type getting this error while deploying ldsUtil js file
Aman Anil Tiwari - Thank you SO MUCH for posting. That did the trick!!!
Thanks @amantiwari9619 It worked for me.
Thanks Anil Tiwari !! Your suggestion helped.