I am eager to try out the new ManifoldJS that Microsoft announced at Build 2015, but I am struggling. I have put up a basic site on http://powertalks.azurewebsites.net/. It is a HTML- and JS- app using Angular and TypeScript. I have also published a manifest.json file, so all should be good to go.
When I try to generate a package online from: http://www.manifoldjs.com/generator, it says it is generating, but nothing happens. Looking at the dev tools, I see that an 500 Internal Server Error pops up. Trying the command line yields no results either. It starts to generate the packages, but returns with a new error:
"Command failed: 'C:\Users\FirstName' is not recognized as an internal or external command".
I should point out that my manifoldjs file is installed on 'C:\Users\FirstName LastName\AppData\Roaming\npm\node_modules\manifoldjs', so might be something to do with the space in the path?
The issue has been addressed (https://github.com/manifoldjs/ManifoldJS/issues/57) and the fix will be available in version v0.2.1.
Related
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.
I've got the lovely topojson library working for me in a Rails app locally:
https://github.com/topojson/topojson
and it's allowing us to show some nice geoJSON in a google map like so:
I show it with the map.js file exposed, since that seems to be where the trouble is when we deploy to heroku. On heroku the map.js file gives an error on chrome:
maps-....js:27 Uncaught SyntaxError: Unexpected token export
and a similar error (although on a different line) on firefox:
SyntaxError: export declarations may only appear at top level of a module maps-...js:1
I've been in touch with heroku support who suggested locking down our npm version, as it seems like the minified js file is ending up with slightly different content locally than on heroku. I note that I've done everything I can to replicate production mode locally, clobbering and recompiling the static assets etc. and running like so:
RAILS_SERVE_STATIC_FILES=true DEVISE_SECRET_KEY=1234 AIRBRAKE_PROJECT_ID=1234 RAILS_ENV=production bundle exec rails s
but try as I might I cannot replicate the issue on my dev machine.
You can see all the gory details in this PR https://github.com/AgileVentures/LocalSupport/pull/1069 and I was wondering if anyone had any ideas about anything else that could be a difference between my dev machine and heroku that could be leading to the javascript files compiling differently? On heroku we have the following:
export*from"topojson-client";export*from"topojson-server";export*from"topojson-simplify
but there is no mention of the offending export keywords in the static assets compiled locally, but there they are in the files on the heroku server. I've been trying all sort of methods to ensure that I'm deleting cached files and that that the changes I am making are being reflected both locally and on heroku.
I've also been investigating ways to try and handle the export keyword (new in es6) but that seems like an even deeper rabbit hole, i.e. sprockets 4 or webpack or similar.
Anyhow, if anyone has any thoughts on other things that could cause heroku to be operating differently here I'd love to hear them, so I can either lock them down or work out how to replicate the bug locally.
Many thanks in advance
Heroku support are saying that the problem here is using npm with the asset pipeline and the better approach would be to use webpacker
I have created a simple application using Create-React-App (CRA). The problem is that even though the app runs perfectly fine on my localhost (ie, after using npm start), when I try to publish my pages to gh-pages (npm run build, and npm run deploy), I am not able to load the page using the URL. I don't even see any errors in console at first, but after a while (or more specifically, after I open the Timeline tab in console), I see the following error.
Failed to create temp file 18 : It was determined that certain files
are unsafe for access within a Web application, or that too many calls
are being made on file resources.
I do see this warning on my local dev environment,
[Violation] Long running JavaScript task took 229ms
and the minified bundle.js file goes to about 4MB in size. But I guess this is not the issue because my other projects have the same warning and they are published just fine.
I'm also fairly confident that this is a more JavaScript related issue, rather than CRA related. I read somewhere that this might be a network mapping of resources issue. But so far, I'm not really sure what this means or how to resolve it.
Just to answer my own question, in case anybody else lands up here.
The issue was in the way I was using react-router. I was initially using browserHistory instead of hashHistory.
As per the docs,
GitHub Pages doesn’t support routers that use the HTML5 pushState
history API under the hood (for example, React Router using
browserHistory). This is because when there is a fresh page load for a
url like http://user.github.io/todomvc/todos/42, where /todos/42 is a
frontend route, the GitHub Pages server returns 404 because it knows
nothing of /todos/42.
More information can be found here.
I'm trying to use MQTT npm package as part of a NativeScript application I'm building.
I'm running into a problem when I try to require it.
My code uses the var mqtt = require('mqtt'); as the example indicates, but when trying to compile the NativeScript application, I get the following error :
com.tns.NativeScriptException: Failed to find module: "mqtt", relative
to :/app/tns_modules.
I've verified that the mqtt folder is in my node_modules folder, and I tried creating a tns_modules folder and copying the mqtt folder there as well.
However I'm still getting the error. I tried loading the knock-knock-jokes package and that loads perfectly.
I'm using the latest versions of Node and NativeScript as 13 April 2016 (4.4.0 for Node and 1.7.1 for NativeScript).
Ok, I tried this out to see why this is happening.
The very first line of mqtt.js is
#!/bin/node...
Which is invalid JavaScript code. Node has been programmed to ignore it; but NativeScript does not. (Might be worth a enhancement request..)
So when it loads this file to parse it, it fails to parse and returns that it isn't available. (Not always the best error on parse issues)
HOWEVER, if you fix that error you will run into MORE issues. It will then complain about not finding the "net" library. NativeScript does not have a net library built in. To my knowledge no one has yet created a net replacement for NativeScript. So, in a lot of cases you can use node modules as is; but if they call anything that depends on a built in node library; they unfortunately will not currently work in NativeScript as their is no equivalent library existing.
Just looking at the dependencies of the mqtt library; your odds of getting this working on NativeScript looks at a glance pretty slim.
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.