Assertion Error : App Version has already been registered - javascript

Im using ember to develop a project.
Please help me with this error. Im unable to run my project on local. After hitting
ember server the build is successful. But on hitting the http://localhost:4200
Loads empty page with console error.
Uncaught Error: Assertion Failed: The initializer 'App Version' has already been registered
at assert (index.js:172)
at Function.initializer (index.js:420)
at registerInitializers (index.js:27)
at loadInitializers (index.js:68)
at Module.callback (app.js:25)
at Module.exports (loader.js:106)
at requireModule (loader.js:27)
at app-boot.js:3
Unable to understand what to do. Any help regarding this would be appreciated.

I did a code search to see where that initializer might exist and it looks to be part of ember-cli-app-version.
In your place I would remove ember-cli-app-version from your app with npm uninstall --save-dev ember-cli-app-version and then run ember serve again. The purpose of this addon is to make it easy to see your app's version number in the ember inspector, but that's not a big deal so removing it won't break anything and should get you moving forward.
If you want to investigate the issue further try searching your code base (including node_modules) for App Version to see where a duplicate exists.

Running npm install solved the problem.

The actual issue was due to the iCloud sync being active in my Macbook.
Turning iCloud sync off should solve the problem.

Related

Error [ERR_MODULE_NOT_FOUND]: Cannot find module... during DigitalOcean App Platform deployment

I'm trying to deploy my node js backend to DigitalOcean with their App Platform with Github.
I tried many things but still don't work yet.
I get this error :
I suppose it can ben because of type module from es6 but localy it work perfectly fine...
Every files are in good folders in my repo in Github so I don't understand why I still get this error...
And this error occur with others controllers/models too, changing each deployment...
This is my first true deployment for a customer and I really need help :-)
Thanks !

React: Unable to start old projects. Why?

I am unable to npm start my old React projects (created in October and before, ex: https://github.com/DebojyotiRoy15/Calculator-app). When I try to do it, I get the following error:
I have tried various things suggested in stackoverflow to solve this error, like adding a .env file to the root, deleting package-lock, deleting node modules and then installing them. But still this error persists. Please help me to resolve this.
I managed to run your app without any issues, check it out here https://codesandbox.io/s/wizardly-dream-s5w2e. Your error is probably due to some package resolving behavior of Node.JS. Try renaming the C:\Users\Pavilion\node_modules\babel-jest", and if it didn't help then run npm i babel-jest --save-dev and reload your app again.

Error when deploying the gatsby app with gatsby-source-buttercms on Zeit

My code: https://github.com/who-know-cg/main-gatsby
Every time I build my Gatsby app (on Zeit) I get this error message:
ERROR #11321 PLUGIN
"gatsby-transformer-json" threw an error while running the onCreateNode lifecycle:
Could not find function loadNodeContent for plugin gatsby-source-buttercms
Error: Could not find function loadNodeContent for plugin gatsby-source-butter cms
And I never meet this error when in developing using gatsby develop.
Here is a similar question on github https://github.com/ldd/gatsby-source-github-api/issues/10 .
But I don't know what the answer means, and I don't know if it's the same issue either.
Please help me find what part is going wrong, thanks you.
If you haven't gotten an answer yet there is a temporary workaround this issue. The github you've linked itself is very helpful.
Take the source code and use it as a local plugin.
https://www.gatsbyjs.org/docs/creating-a-local-plugin/
Change the mediaType in the source code from application/json to text/plain. This should be a working temporary solution.
this works for me
npm install Pearce-Ropion/gatsby-source-apiserver#6112115 -D
yarn add Pearce-Ropion/gatsby-source-apiserver#6112115 -D

exit code 8 suddenly occurs when the code was working fine just moments before

I am currently working through the lessons in David Turnbull's ebook entitled Your Second Meteor Application. When I got to the beginning of Chapter 6 (User Accounts), I suddenly started getting a very strange error message which now prevents me from running the code. The message started to appear after I added HTML lines to the 'Register' template. I knew three simple lines of HTML couldn't possibly trigger the sort of error I was seeing, so I tried everything I could to see if I had misplaced a comma or a brace or a semicolon -- anything.
Knowing there was nothing wrong with the code itself, I copied the .JS, .HTML and .CSS files into a new project and, voilĂ , they worked again. Until I shut it down and tried to restart it the next day. Now that project doesn't work either. So now I'm stuck with two identical projects which clearly can work but won't right now for some reason.
I am completely baffled by this. All I can figure is that some code in one of the files inside the .meteor directory has changed or something. I certainly haven't changed anything at all.
Here are the error messages I am getting:
Your app is crashing. Here's the latest log.
C:\Users\David\AppData\Local.meteor\packages\meteor-tool\1.1.4\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:245
throw(ex);
^
Error: A method named '/todos/insert' is already defined
at packages/ddp/livedata_server.js:1461:1
at Function..each..forEach (packages/underscore/underscore.js:113:1)
at [object Object]..extend.methods (packages/ddp/livedataserver.js:1459:1)
at [object Object].Mongo.Collection._defineMutationMethods (packages/mongo/collection.js:904:1)
at new Mongo.Collection (packages/mongo/collection.js:209:1)
at app\2015-09-10-backUps\todo.js:1:44
at app\2015-09-10-backUps\todo.js:186:3
at C:\Users\David\LaunchCode\todo.meteor\local\build\programs\server\boot.js:222:10
at Array.forEach (native)
at Function..each..forEach (C:\Users\David\AppData\Local.meteor\packages\meteor-tool\1.1.4\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\underscore\underscore.js:79:11)
Exited with code: 8
Your application is crashing. Waiting for file change.
I have the following packages installed in my project:
accounts-password 1.1.1 Password support for accounts
autopublish 1.0.3 Publish the entire database to all clients
insecure 1.0.3 Allow all database writes by default
iron:router 1.0.9 Routing specifically designed for Meteor
meteor-platform 1.2.2 Include a standard set of Meteor packages in your app
FYI I can run other apps in Meteor, just not this one. I read elsewhere that someone who had a similar problem had solved it by re-installing Meteor, but that wouldn't seem to be the issue for me given that other apps do run.

Exception in defer callback: Error: No uiManager configured on Router

I guess the better question here is more general: how do I debug errors for deployed apps? Does Meteor have commands/logs I can look at? I'm really not sure where to begin because everything works fine locally.
I'm getting this error in the browser console when I try to view the Meteor app I deployed to *.meteor.com. Output is a blank screen, but locally, the same code results in no errors and output is normal.
Has anyone seen this before? There's a thread connecting this to accounts-ui-bootstrap-3 but I'm not using that.
For reference, I'm using Meteor 0.8.1.3, blaze-layout 0.2.4, iron-router 0.7.1, and accounts-entry 0.7.3.
EDIT: looking at meteor logs right now but nothing constructive so far.
Same issue, in same places (prod but not dev). Running mrt update and meteor update fixed it for me.
Are you using meteorite? Try adding blaze-layout:
mrt add blaze-layout
And check in .meteor/packages that it loads after iron-router.
Then deploy as usual to *.meteor.com
I encountered this issue after updating to the latest meteor with:
$ sudo meteor update
Read through several posts, and found my issue was caused by not running the update through Meteorite:
$ sudo mrt update
This fixed the slew of errors I encountered.
Also, I had to remove the package blaze-layout, which I had manually added through mrt as suggested above, because it caused a recursive dependency with with iron-layout.

Categories