Can't resolve 'src/assets/materialize/js/materialize.js' - javascript

Can't resolve 'src/assets/materialize/js/materialize.js' I have this problem, and IDK how to fix the problem, when I start the server this problem appears.
5 unchanged chunks
Build at: 2023-01-06T15:23:55.806Z - Hash: c33ce2a864781251 - Time: 1447ms
Error: Can't resolve 'src/assets/materialize/js/materialize.js' in 'C:\Users\users\Documents\url\semestre5\web\proyectoUTM\Cliente'
× Failed to compile.

https://materializecss.com/getting-started.html
Download materialize and, you need to extract the .zip, when finish, you need to put the extract in proyecto/src/assets/.
In there you put the archive that you download.
enter image description here
enter image description here

Related

Error Updating a Chromebook's Organizational Unit with Google Script

I have been experiencing an issue recently with a Google Script code I wrote to update a few Chromebooks' organization units.
Here is a portion of the code that I am running:
let admin = AdminDirectory.Chromeosdevices.get("my_customer", active_deviceid[serial_index])
admin.annotatedAssetId = device_ID.toString()
admin.annotatedLocation = name
admin.orgUnitPath = _location_(device_ID).toString().toUpperCase()
AdminDirectory.Chromeosdevices.update(admin, 'my_customer', active_deviceid[serial_index])
Once the script executes I get the following error:
GoogleJsonResponseException: API call to directory.chromeosdevices.update failed with error: Invalid Input: Inconsistent Orgunit id and path in request - 11006550017573025, /1 SCHOOLS/COVID LOANERS
What is strange is that if I comment or remove "admin.orgUnitPath = location(device_ID).toString().toUpperCase()" the script will run fine. It seems the orgUnitPath is causing this error.
I tried the following:
Removing the first slash "/"
Do only 1 Chromebook
Remove and reapply the AdminDirectory
Run previous scripts that were used to change the OrgUnitPath
Added quotes on the beginning and end of the OrgUnitPath
Converted the path to String with toString()
used Stript() function to eliminate any empty spaces
All the above attempts failed to fix this issue. I will also include an image of an error I am getting from a previous script I made that used to work about a year ago that also changes the OrgUnitPath.
Does anyone know how to fix this issue?
Thanks in advance.
For some reason there has been a change that now requires the orgUnitId in addition to the orgUnitPath.
So before you run AdminDirectory.Chromeosdevices.update you need to obtain the orgUnitId and update that property
var orgUnitPathStr = "/Tech Dept/Storage"
admin.orgUnitId = AdminDirectory.Orgunits.get("my_customer",orgUnitPathStr.substring(1)).orgUnitId;
//substring(1) above removes the first slash in the orgUnitPath, which is required for this method
Credit for hints:
https://github.com/taers232c/GAMADV-XTD3/issues/225

Parsing errors in Chrome

<script type="module" id="user-code">
try {
someUnknownReference;
} catch (error) {
console.log(error) // correct
console.log(error.toString()); // incorrect
console.log(error.stack.toString().split('\n')); // incorrect - line number and filename is wrong
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIl0sIm5hbWVzIjpbImxrc2xrcyJdLCJtYXBwaW5ncyI6IkFBQUFBLE1BQU0iLCJmaWxlIjoiYnVuZGxlLmpzIiwic291cmNlc0NvbnRlbnQiOlsibGtzbGtzIl19
</script>
I'm building a browser based code editor using Babel. All is working well, however I can't for the life of me extract the line number and file name out of the errors that happen during run time.
The example above is a simplified version of what I'm doing. I'm injecting a string into a script tag e.g scriptTag.innerHTML = bundledCode;
The first console.log prints exactly what I want to parse e.g it has the file name and correct line number which it gets from the sourcemap
ReferenceError: someUnknownReference is not defined
at index.js:1
However, as soon as I try to do anything with the error e.g the second console.log, I lose the line number and file name.
ReferenceError: someUnknownReference is not defined
My guess is maybe it's losing the reference to the sourcemap when we try to parse the object?
Thanks in advance for any help!
I think Chrome console is automatically consuming source maps to provide the correct error msg if you're console logging the error. Not if you're grabbing the actual string. Do you need something like this: https://www.npmjs.com/package/sourcemapped-stacktrace?

Highcharts send a lot of request when "enablePolling: true", with "googleSpreadsheetKey"

I have set the dataRefreshRate for 20s, but it doesn't work, it send alot of request to server
enter image description here
After an hour finding the issue, finally I 've solve it.
The unit of dataRefreshrate when we load data from CSV is different from loading from googleSpreadsheetKey, CSV use the unit Second while googleSpreadsheetKey use the unit MiliSecond. So, If the value in CSV = 10, mean in googleSpreadsheetKey = 10000

Download Fortify export data using the API

Objective
To generate CSV "export data" files from within Fortify, then download them.
Steps
Generate the (csv) export data using, that works fine:
https://SERVER:8443/ssc/api/v1/dataExports/action
Download the csv file using:
https://SERVER:8443/ssc/transfer/reportDownload.html - GET
Problem
I'm facing an issue with step 2, export being successfully generated. I can't seem to download them.
I'm requesting :
https://SERVER:8443/ssc/api/v1/fileTokens
with the payload : { fileTokenType : "REPORT_FILE" }
I obtain:
YzFmOWY4ZjMtZjU2MS00ZTU0XXXXXXXXXXXXX
Yet as per the documentation, I should get something like:
7e8d912e-2432-6496-3232-709b05513bf2
As a result when I attempt to GET my file with the following request:
https://SERVER:8443/ssc/transfer/reportDownload.html?mat=YzFmOWY4ZjMtZjU2MS00ZTU0XXXXXXXXXXXXX&id=449741
I get a 500 error.
Questions
What do you guys get when you request: https://SERVER:8443/ssc/api/v1/fileTokens?
Is the documentation not exactly correct?
If not, what do you reckon I am doing wrong?
Found the solution, the correct link is
dataExportDownload.html
instead of:
reportDownload.html

How to find specific file for a HTML element

I'm helping a small client with a rather simple issue, but it turned out not to be so simple.
byseven.dk (in the footer)
Has a contact formular, which says "Navn (Required)" now the first part is danish the second is english, and I would like to replace the (Required) with a simple *.
However I can't seem to locate the specific place for the (Required)
Is there a simple way to track this down, as I'm sure it goes something like this
frontpage.php -> footer.php -> sidebar(widget).php (functions.php) -> some template file I can't find.
// Update 2
First of, I have no clue what this -3 and +5 system is, however I assume it's something negative, would anyone be so kind as to explain to me, what the problem with the question is?
Second, I found the widget in the backend, which reads the following:
[contact-form to='kontakt#byseven.dk' subject='Kontaktformular'][contact-field label='Navn' type='name' required='1'/][contact-field label='Email' type='email' required='1'/][contact-field label='Besked' type='textarea' required='1'/][/contact-form]
And so the label says 'Navn' but not 'Navn (required)' I'm assuming this could be due to a script inserting this 'Required' after whatever the label is.
Still unable to find the file in which this is inserted. I did a search for the Cmd + F throug all files inside the theme folder of the FTP.
// Update 3
For now I fixed it with a script, but still I would like to know how to track the origin of the code down.
function staticTranslation() {
jQuery( 'label span' ).replaceWith( ' *' );
}
staticTranslation();
I would start with
find . -name ¨*.php¨ -exec grep Navn {} \;
assuming the server is Linux. If not use whatever tool you have for a recursive pattern search.
Then search through *.js, *.html and whatever other next files you have got. There is a chance this might be off the file system and be residing in a database.

Categories