Running meteor app on Windows from MacOS - javascript

I got a Meteor project from a friend who develops on MacOS.
When trying to run it, I get:
This project uses METEOR#1.0.2.1, which isn't available on Windows. To
work with this app on all supported platforms, use meteor update
--release METEOR#1.2.1 to pin this app to the newest Windows-compatible release.
When running it, I get:
While checking for cfs:gridfs#0.0.27: no compatible binary file
found...
Then, when I try to override (use run instead of update), without actually updating, it starts proxy and Mongo, but then breaks at, but skips the first error
While building package npm-container: error: No plugin known to handle
file '../../packages.json'. If you want this file to be a static
asset, use addAssets instead of addFiles; eg,
api.addAssets('../../packages.json', 'client').
I read that this error is fixed by updating meteorhacks, but when I try to, I get the Meteor version conflicts (see very first error) and I have no idea how to break out of the loop.
Can someone shine some light on how to fix any of these error?

Related

SyntaxError: Unexpected token in JSON at position 0 in meteor

I am getting an error when running meteor.js. This is the following error:
PS C:\Users\ketan\Documents\Meteor> meteor run
C:\Users\ketan\AppData\Local\.meteor\packages\meteor-tool\2.1.1\mt-os.windows.x86_64\dev_bundle\lib\node_modules\meteor-promise\promise_server.js:218
throw error;
^
SyntaxError: Unexpected token in JSON at position 0
at JSON.parse (<anonymous>)
at ProjectContext._readResolverResultCache (C:\tools\project-context.js:605:16)
at ProjectContext.reset (C:\tools\project-context.js:245:10)
at new ProjectContext (C:\tools\project-context.js:60:8)
at Command.doRunCommand [as func] (C:\tools\cli\commands.js:356:24)
at C:\tools\cli\main.js:1528:15
I can't understand the error. Please tell me the solution for this.
Note: My laptop shut down in the previous session of the meteor.
The Solution
How I ultimately ended up fixing this was just by re-cloning the repository I was working on from GitHub - after this, my application ran fine.
NOTE: I've edited this answer because I originally thought Jankaput's answer worked for me, but after digging a little further I found that it didn't.
More Info
I ran into the same problem after a shutdown while a previous Meteor process was running.
For me, running meteor reset and re-installing node_modules seemed to prevent the mentioned error from happening, but when I ran the application, I noticed odd behavior from several different sections of the application (i.e. certain packages wouldn't work, some methods that normally run fine on startup threw errors, etc.)
This makes me think that some sort of project setting was corrupted due to the meteor server I was running ending abnormally when I force shut down my computer. I'm not sure why whatever setting was corrupted managed to stay that way across a meteor reset (since meteor --help specifies that it 'Resets the project state'), but the fact that a re-cloning work makes me think that it did.
Due to the fact that it seems like running meteor reset could allow some corrupted project settings to fly under the radar after this issue pops up, I personally feel that it's probably just best to re-clone your project if this happens to you, just to be sure that nothing about the project is corrupted.
This appears to me that you have a syntax error in a JSON file that is being read by the Meteor build tool. Do you have a settings.json file in use in your project? If so, check for trailing commas or keys missing double quotes as these are the most common errors introduced to a JSON file.

Weird CORS errors on fresh vue cli project

I just started building my second Vue project, and for the first time I wanted to use the Vue CLI and NPM rather than just loading Vue via CDN.
Installing the CLI and setting up the project worked without problems, but when I ran "npm run serve" and navigated to localhost:8080 in my browser (latest Firefox) to see if it worked, I got the following error message in my browser console multiple times:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://10.126.86.51:8080/sockjs-node/info?t=1584021154635. (Reason: CORS request did not succeed).
I also get this error message once right after loading the page:
[WDS] Disconnected!
Does anyone know what these errors mean, why I get them and how I can get rid of them?
The first one seems to be related to some kind of cross-origin call that the app is making using the host's actual IP rather than localhost, but I can't think of any reason why it would, given that I literally just installed and served the example project and did not change anything after running "vue create"
Edit: I am on Ubuntu 19.10 Desktop
First of all, what kind of OS you are working on? If you are working on unix based systems, a service (like nginx) could produce this error. If so, try stopping it.
Afterwards I would try to run your application from vue ui.
Type in your terminal:
vue ui
This starts the web based graphical user interface of vue cli. You can handle your app development from there by starting your service and run your build command.
ATTENTION: you must add (import, NOT create) your project (root folder) to the UI.
If you get the same error inside your browser console, set up a vagrant box. First steps are explained here:
https://www.vagrantup.com/intro/getting-started/
Follow instructions for project setup.
Simplest way would be running
vagrant init
inside your project folder. Therefore you don't have to setup a new project.
After running the init command, try running
npm run serve
or use vue UI instead (as explained above), if you prefer it.
If the problem still exists, more infos about your OS would be helpful.

Error when migrating to macOS: TypeError: Cannot read property 'apply' of undefined

I am building a web app using React and Redux on the front end and Node on the back end with Express and MongoDB.
My app runs fine on my Windows machine. Today, I cloned the repository onto my macOS device and ran npm install inside the client and the root directory and then I tried running the application to find this error message pop up:
I'm not sure what this error message means and stack trace displays that the error originates from Redux inside the node_modules folder, which is code I did not write or touch. Here is the repo: https://github.com/furtivepygmy/devconnector
I'm new here, so please go easy on me. I always face issues when moving my workspace between macOS and Windows, however I can't seem to fix this one. Is there something I need to do when migrating between operating systems?

Error: GET http://localhost:4200/assets/vendor.js net::ERR_INVALID_CHUNKED_ENCODING, on Ember.js server

I am just getting started with Ember.js at v2.9.0, followed the tutorial on their page https://guides.emberjs.com/v2.9.0/tutorial/ember-cli/, all good, save for one detail: Whenever I tried to refresh or load the development web app on Chrome browser after executing ember server on the cmd, the app would not load in browser and provide the following error most of the time (there were other errors as well but seem to be related to this one):
GET http://localhost:4200/assets/vendor.js net::ERR_INVALID_CHUNKED_ENCODING
, and one of the related errors is:
Uncaught ReferenceError: define is not defined
at application.js:1
I have searched for this specific error but without luck, I tried some fix hints found, such as clearing some persistent data with the netsh command, doing an npm cache clean bower cache clean, deleting the node_modules and the bower_components folders and reinstalling dependencies; also ensuring that there was no weird proxy configuration in my LAN settings, etc.
I have encountered this error while following the tutorial, and it would kind of be bypassed by refreshing the browser a few times until the app displayed. That was before, but now the refresh does not work when working on an existing application.
I am on:
Windows 10
ember-cli v.2.9.1
node.js LTS v.6.9.1
I need to get going with this rather soon, so any hint to resolve this issue is appreaciated. Thanks!
Might be a conflicting process running... Are you working over a VPN? If so, take a look at https://superuser.com/questions/893908/err-invalid-chunked-encoding-from-chrome

kurento's remote stream is not working

I installed kurento-media-server-6.0 and I turn on media-server and Hello World!(Tutorial 1, Version - node.js). But when I click a start button, Remote stream does not work.
Console >>> TypeError: videoStream.addEventListener is not a function
Please give help to me, who knows why this error happens.
You are missing the appropriate js dependencies at the browser side. This should be fixed executing 'bower install' in the root folder of the tutorial (as specified in the corresponding tutorial documentation), in case of a fresh installation; or executing 'bower update' in case you had the tutorial installed previously.
In addition, double check that tht tutorial is in the appropriate version (6.0.0 tag). Sometimes mixing 5.x client code with 6.x media server generates that type of problems with dependencies.

Categories