The file is not displayed in the editor because it is either binary or uses an unsupported text encoding - reactjs

Is it related or not I don't know but when I install firebase and open VS Code again, this problem appeared in package.json and package-lock.json when click to 'Open anyway' button Text-Editor this nulnulnul issue come up
nul problem:
When I open package.json file with Hex Editor shown like this
with hex editor:
Edit:
I deleted package.json files and install all packages again and it works

just extract the files before you even open the zipped files in the vs code

Had similar experience and these are the steps I took.
If you've push the project to github or any source control system, copy the package.json file in the repo, delete the corrupted package.json file in the project folder, then paste the copied package.json file on your project folder.

I went through this problem
The cause of the problem was that I had the files in extension Example.rar
Then instead of extracting the files by decompressing them
I dragged it through a program window through
instead of extracting it naturally
I was using a system at the time ubuntu And I want to access the files through a program "vs code"
The program I was using is called "Archive Manager"
The Archive Manager in Ubuntu is a utility program that allows users to manage compressed archives, such as ZIP, TAR, RAR, GZIP, and BZIP
Solve the problem if you go through the same experience as me
Unzip the files normally
Then try to make sure the files are working

Related

File format Error after Download - Jekyll blog

I would like users to download a zip file and I have the following code.
<a href="directory/fileName.zip" download>DOWNLOAD</a>
However, when I test it out, the file downloads instantly and when I try to open it, I get the unsupported format error. On localhost, it downloads instantly but the zip file successfully opens.
I am on MacOS and have git lfs installed if that is important. Any help would be greatly appreciated. Thank you.
I tried renaming the file so that there are no spaces in its name, tried to separately compress the directory to be zipped.

Problem with WPF Setup Program Installation Path

I have a Program Setup project in my solution that should install my program to the default location:
[ProgramFilesFolder][Manufacturer][ProductName]
However, this is not working and the installer is dumping all of the project files into my C: drive during installation without creating any folders at all. Even the installer says the files will be installed in "C:\Program Files (x86)\blah\blah", but they aren't. I double-checked I have values set for manufacturer and product name that don't include any special characters besides space.
I followed this tutorial step by step to get where I am:
https://learn.microsoft.com/en-us/cpp/ide/walkthrough-deploying-your-program-cpp?view=vs-2019
Any ideas on what could be causing my installation files to be placed in the C: drive?
I will say, my project runs correctly when running from the C drive, so the installation is technically working, it's just failing to create the program files folders and place the installation files in the correct location.
Thanks.
It seems the issue has to do with permissions on the computer. The files install to the correct directory when the installer is ran from the downloads folder.
I still find it odd that the installer dumps files into the C root drive instead of aborting the task, but at least I know now you can avoid this issue by running installer from the downloads folder.

How to generate USDZ file again from ZIP file?

Hello everyone I'm trying to unzip a USDZ file, modify a texture, and then zip the USDZ file again, but it breaks.
Is there any special way to zip the file back? Even if I decompress and compress again it stops working and has different file size.
I'm using no compression and no encryption to zip the file. One thing I have noticed is that the attribute "Needed to extract" for the USDZ file is "2.0 or later" while my new zip file value is "1.0 or later". Also the files in the original USDZ zip have some extra fields I cannot read or add to my new file.
What could be happening? Any help would be appreciated.
Unzip usdz file
To unzip a usdz file in macOS use the following steps (if you don't have Mac, use a Hackintosh):
In Finder change the extension of .usdz file to .zip.
Uncompress .zip file by double-clicking it.
Open unzipped directory and change the .png textures of your model.
Open and edit .aiff, .caf or mp3 audio files, if any.
You can even import a binary .usdc file in Maya 2023 for animation.
Create usdz file again
Make sure that the latest Xcode version is installed (now Xcode 14.0).
To convert a content of unzipped folder (binary usdc file and its textures) back to usdz file format again, use the following command in Terminal.app:
usdzconvert ~/Desktop/file.usdc -diffuseColor Grammophone_Albedo.png
-metallic Grammophone_Metallic.png
-occlusion Grammophone_AO.png
-normal Grammophone_Normal.png
-roughness Grammophone_Roughness.png
And here's an additional info about usdzconvert command for Xcode 14/13/12/11/10.
To pack my modified USDZ file back, I used the tools provided here: https://github.com/PixarAnimationStudios/USD (usdzip) which works in Windows and Linux.

How to archive new build files in jenkins -pipeline script in groovy ReactJS

trying to archive all the files into a zip file that is formed in the workspace in jenkins pipeline script. I tried using this
archiveArtifacts 'C:\Program Files (x86)\Jenkins\jobs\pipeline CI_MS\workspace'
but error was shown as "file not found"
Thanks for any help
Do you really want to archive everything in the entire workspace? Hardcoding the path like that is a bad idea. The workspace moves, and if you are using a more recent version of Jenkins (that wasn't upgraded from an old version), you are probably not even looking in the right space.
Use this:
archiveArtifacts "${WORKSPACE}"
Add to the end of the path if you want to archive files in subdirectories.

touch .gitignore not creating file

I'm trying to set up a React dev environment, and one instruction I've been given is to enter my directory in Terminal and type this code:
touch .gitignore
The touch command works fine when I'm making a file with a name and extension (e.g. index.html) but since this appears to be only an extension, nothing is happening.
Apparently it's an important file regarding uploading to GitHub - can anyone help?
Update: I created x.gitignore, and then tried deleting the x, and it OSX throws up a dialog saying:
You can’t use a name that begins with a dot “.”, because these names are reserved for the system. Please choose another name.
You can see all of the visible files within a folder by typing
ls
into your terminal (assuming OSX from your comment). However, you will only see a list of the non-hidden files. You can see all files by typing
ls -a
Your .gitignore file basically tells git which folders and files to disregard when packaging everything up to be stored. For example, in ReactJS projects you are probably going to be using a lot of NPM packages and you wouldn't want to include them in your git repository. So, in your .gitignore file, you would include a line that says
node_modules
and then none of the files or folders within node_modules would be included when you push to Github (or Bitbucket or wherever).
If you are having trouble finding the .gitignore file, first run the ls -a and make sure that you see the file listed. After that, if you are having trouble seeing the file in your text editor, you may want to check the preferences in the text editor.
In Atom, you need to unselect "View VCS Ignored Paths" to see the "ignored" files.
type in terminal
npx touch .gitignore

Resources