VM305:5551 crbug/1173575, non-JS module files deprecated - javascript

I'm getting this error on browsers console, and js file are not loaded:
VM305:5551 crbug/1173575, non-JS module files deprecated.
But if I use a private windows, there is no error and the webpage works.

I deleted the launch.json file, it worked for me

I had this problem twice in React.js. Both while using libraries for pdf to image preview. One was Mozilla's PDF.js library. The npm package is known as 'pdfjs-dist'. When I removed this package, the error was gone and the server ran perfectly normal.
These libraries might be using old cr.js or module technologies.

Personnaly, I suddenly encountered this problem today while I never encountered it before. Deleting the launch.json didn't fixed the problem. I opened that file and saw that the url tag was followed by "http://localhost:8080" instead of my HTML file's path. So I replaced "http://localhost:8080" with the path of my HTML file, then it was working again.

if you don't want to delete anything then just type in the terminal of your project :
npm i
to reinstall/ recheck dependencies.

Related

Error when trying to run JS in VScode for the first time (newbie)

So i just installed VScode on my Windows 10. I keep getting the following error:
"Can't find Node.js binary "node": path does not exist. Make sure Node.js is installed and in your PATH, or set the "runtimeExecutable" in your launch.json"
I've tried reinstalling VS and rebooting, tried installing from different folders (both on C drive and the second time i added it to my programs folder)
I tried installing a node.js extension which fails every time and then prompts me to try it manually...which then leads to a file downloading automatically, but when i add it to my VS folder through my file explorer, nothing happens still.
I tried installed a different node.js debugger
I tried changing my debugger to chrome too but all it does is take me to localhost:8080 and an empty page of course.
When i go through file explorer and look through the path of my .vscode folder, the nightly extension (node.js) is there....
I'm new to VScode and have just been using Scrimba's terminal to do my code but decided to try something more professional
I think you're putting node.js in the same folder/path as .vscode, this isn't correct. What you need to do is set node.js in your PATH which is different. See this answer for more information on how to set PATH/environment variables. Also install it from the official website nodejs.org. After changing your PATH remember to reboot.
I wouldn't recommend downloading "node.js extensions" as those likely are not legitimate, and as you've said yourself they don't work. Only download from the official website.
You have to install nodes from this website https://nodejs.org/

Uncaught Error: Based on the provided shape, [1024,3], the tensor should have 3072 values but has 30

I am trying to build a Tensorflow.js app, it works all good locally, but when I hosted it (I tried Netlify and Vercel on both Firefox and Chrome) I got this error:
Uncaught Error: Based on the provided shape, [1024,3], the tensor should have 3072 values but has 30. Any ideas? My only one was that it would have to do something with CORS but I don't know.
Hosted:
Localhost:
JavaScript code: here
you will get such error messages if the bin file is corrupt.
This can happen, for example, if you downloaded a repo from GitHub as a ZIP file, which uses Git LFS instead. To avoid that you need to clone it or download the bin file separately.
In your case I assume that your website hoster does not allow the file extension .bin and you might get an error message as content of the file back.
Also the download times of the json and bin are a bit surprising.
Both are almost identical, although the bin file should be much bigger and therefore requires a longer download.
Best regards,
Sascha
I too faced this issue while running face-api.js models integrated on a React app with a NodeJS server. It was working fine on the local dev environment , but on building and running it, it was not able to resolve the model's promises, with the same error. On exploring the issue, earlier I was using "serve" (npm i -g serve) to host my build app, and it was getting this error. But on changing hosting server to Nginx web server, I application was successfully hosted with this issue resolved.
Switch to Nginx server to host, it will work.
Thank you so much for the reply. I was downloading the model files from the github repository and had the same error.
Way Around [Solution]:
Opened up the demo web application provided in the same github repo and then from the developer tools from the network tab, downloaded the model shared files and model.json file and then ran the local demo again and it worked.
Thanks for the help.
I got the similar error with making use of tensorflow.js in a react application even though neither have I downloaded the bin file from github nor extracted it from a zip file. I was able to serve the model.json and binary file locally perfectly fine but when I deploy it, I was first getting a runtime error and then a on the second try a similar error with different numbers.
It pulled out a sheet metal until I come here and see that maybe I need to check the checksum of the binary files. Well yes, this was the issue. They were different. Git wasn't able to see it. Even though I remove the binary and created a .gitattributes configuration to avoid git making changes to the bin file, It didn't solve the problem. As a temporary solution I upload the binary file manually to our repo for now and it works. I will update this answer as soon as I get to meet with our devOps engineer and have a better understanding for this issue.
I was getting a similar error using IIS Express however I could run the exact same files in VS Code using Live Server with no issues.
After a few days I found this is because the extensionless shard files not having a MIME mapping for them and may be downloaded wrongly. I ended up serving these files from a public folder in local IIS and adding a MIME mapping for "." (extensionless files) to "application/octet-stream" (MIME for binary files).
Later I found this comment on Github that says you can just add the ".bin" extension but you have to change both paths in the corresponding manifest.json
I think either solution should work. The former worked on my Blazor Server project
I am using live server extension for Visual Studio Code IDE, and found it gives me this error:
GET http://127.0.0.1:5500/model.weights.bin 404 (Not Found)
Uncaught (in promise) Error: Based on the provided shape, [3,3,3,8], the tensor should have 216 values but has 39
So I created a new folder named model, and moved the two files, model.json and model.weights.bin, into it. And changed the file path to the new location:
classifier.load("./model/model.json", customModelReady);
Then the error is gone.

Unable to Run JavaScript in Atom with Script package

I am trying to run JavaScript code in Atom with Script package. It can run Python successfully, but with JS files it gives the following error message:
The system cannot find the file specified.
I had the same problem while analyzing some JavaScript code of an extension for Chrome.
Using: Windows 7 64Bit Atom:1.24.0 x64
Since I my coding Folder is somewhere else I copied the files in that folder. Let’s say:
C:\Users\USER\CodingStuff\
then it started working. I have also tried adding the extension file the Sources via:
1 - CTRL+SHIFT+I
2- Right click -> add folder to workspace
But that did not work.
Side note: node.js has to be installed on the system.
Hope it helps.
I know I am late, but if any other faces the same issue, my answer will be helpful.
Assumed that you want to run your javascript outside browser and you installed node.js.
There is a bug in "script" package of Atom. Check ur path of the script if there are spaces then this leads to the aforementioned error. Work around is remove spaces.
for ex:
E:\Java script\trial.js
change to:
E:\Javascript\trial.js

Keep getting "tsc.exe" exited with code 1

As soon as I add a tsconfig.json file to my Visual Studio 2015 web solution I get the above error.
Also this stops the compiler from re-generating js files even when I set "compileOnSave": true.
When I double click the error it takes me into the Microsoft.Typescript.Targets file which contains a lot of issues such as Unknown Item Group "TypeScriptCompile". In the error list these appear as warnings but they are there whether I have a tsconfig.json file or not.
Is there any way of solving it or getting more information on what the problem is?
Install these 2 NuGet packages:
Microsoft.TypeScript.MSBuild and Microsoft.TypeScript.Compiler
It updates your project with MSBuild task definition and TS compiler and solves the compilation issue
For me installing TypeScript for Visual Studio fixed it, although TypeScript was already installed globally on my machine via npm
I am using a .NET Core 1.0 project and ran into the same situation of getting a tsc.exe return code of 1. My problem was an invalid tsconfig.json. However, msbuild does not provide those details.
The easiest way to find out is to enable detailed output in Visual Studio -> Tools -> Options -> Projects and Solutions -> Build and Run -> MSBuild project build output verbosity. Change this to Detailed. After compiling, find tsc.exe in the output window to see the actual error tsc was throwing.
I had this problem as well after using some standard Angular / Typescript tutorials. The solution was as simple as to update typescript in Visual Studio.
For some reason the default is now 1.8.4. and it does not allow you to automatically update it from Visual Studio Extensions and does not say it is out of date. You just download it from here and install newest version yourself. Download link may change in the future of course.
P.S. I think the problem was caused by the fact that some options that did not exist in older compiler were used.
This worked for TeamCity build server with Visual Studio 2015 when I had upgraded a project from Typescript 1.8 to 2.3
Install package Microsoft.TypeScript.MSBuild
Update *.csproj as follows
Upgrade TypeScriptToolsVersion to 2.3 (in this case)
Remove two lines of Import Project that referred to
Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets
Note
Removing the import elements is important as they are referring to TypeScript installed in the %PROGRAMFILES(X86)% folder.
Installing the package adds import elements that reference the packages folder - making your build more portable
I had same issue and what happened in my case is that the file .ts was in the project but it was not on file system. Something like this . So removed the file from project and everything started to work again.
Move all files within C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Typ‌​escript into some new folder (e.g. backup), then try again. This will cause MSBuild to select tsc.exe from within the appropriately versioned folder instead of using the one in the C:\Program Files (x86)\Microsoft SDKs\TypeScript.
Installing Microsoft.Typescript.MsBuild fixed the issue for me, but only if I installed the penultimate version. The current (stable) version is 2.0.6, and after I installed it, the issue persisted. When I reverted to 1.8.11, the issue went away.
I had the same issue. Fixed it by removing the following from the project file
<TypeScriptToolsVersion>2.0</TypeScriptToolsVersion>
Double clicking on one of the .ts files inside of visual studio worked for me. It then came up with a dialog box asking if I wanted to update the project to the latest version of TS. After that the project built fine and the compile error was gone.
There is need to Re-Install/Upgrade, Typescript in your system.
As i was facing same issue and after installing Typescript again got resolved the error, as tsc.exe was missing in (C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.1).
We are using npm and angular-cli outside VS to transpile our typescript. I ran into the problem described above on the only dev box that had the Web Essentials extension loaded. After trying installing, and then uninstalling the MS nugets and TypeScript extension described above to no avail, uninstalling Web Essentials finally did the trick.
I was facing same issue, and the reason was, 2 developers were working on same project so when he added new .ts files into project and some angular controllers. The project was rebuilding and running as expected however when another developer tried to take latest source code on his machine and on rebuilding he was getting same error "tsc.exe" exited with code 1.
So reason was the files created/added in source control was not showing added on
developer 2 solution. Please try to check if all the .ts, .js files are up to date on both developers solution.
I had the same issue on a solution using AngularJS but without the compiler (below 2.x so not needed). I simply removed the index.d.ts from script folder and it was ok (no NuGet packages necessary)
If youre are facing this problem when updating from bootstrap 3 to 4 just delete .ts file created inside the Scripts Folder then build again.

Error while installing JSLintMate for Text Mate

I am trying to install JSLintMate http://rondevera.github.io/jslintmate/ for my text mate. Downloaded the bundle from their website and it suggested that it will get install automatically.
On unzipping it is asking for file encoding format and i am selecting default UTF-8
But after running the installation bundle I am getting an error
The bundle “JavaScript JSLintMate 1.4.tmbundle” does not contain the
required “info.plist” file (or that file is corrupt) and can therefore
not be installed.
I searched on the web regarding this but not able to find the solution.
Text-Mate Version: 1.5.11
OSX: Maverics 10.9
JSLintMate: 1.4
Is there anything wrong from my side or some additional step is required to make it work? Also please recommend me some alternatives since its not working.
Ok finally its working.The problem is with the unarchiver utility only. If I use default archiver utility instead,it's perfectly working fine https://github.com/rondevera/jslintmate/issues/30

Categories

Resources