React IE8 works locally, not in production - amazon-web-services

We started introducing React to our large Django project to handle frontend complexity. So far, so good, but we ran into a problem.
React does not work in production on IE8. Locally it works fine on IE8. I've included es5-shim and es5-sham and I do see them in dev tools in production (included in the header, before React and code that's using React). But still, I get this error, like there's no shim:
SCRIPT438: Object doesn't support property or method 'isArray'
I also got:
SCRIPT438: Object doesn't support property or method 'bind'
after which I included script mentioned in this post:
How to handle lack of JavaScript Object.bind() method in IE 8
However, after that I get:
SCRIPT5023: Function does not have a valid prototype object
And I'm still getting the old errors. Again, locally it's working fine in IE8 so I'm guessing it's not the code itself that is the problem. Our app uses AWS CloudFront (but I do see the static .js files included in the html).
Any ideas what might be happening here?

Related

Why does cjs file extension on babel.config break module-resolver?

I have created a minimal reproducable example with a detailed README here.
In my expo app, I was having trouble using the babel module-resolver to use path aliases. My Metro bundling would fail when I used path aliases.
I learned that when I changed my babel.config file extension from .cjs to .js, the problem was resolved.
However, I do not understand why that would have any effect on whether the module-resolver plugin would work.
As described on babel's documentation, "Babel can be configured using any file extension natively supported by Node.js", with cjs specifically enumerated. And as I understand it, Expo by default creates a CommonJS babel.config file as it uses module.exports.
I have never created a GitHub issue, but perhaps this question is better suited as a babel-plugin-module-resolver issue, or I need to narrow down this issue further to determine whether Expo, or other babel plugins are relevant.
In short:
I tried creating a new expo app with npx create-expo-app to see if something about my project was effecting this issue. I then added a path alias to a test component and imported the component with the path alias. I ran expo which resulted in a bundle success. I then renamed babel.config.cjs and ran expo again with --clear, which resulted in a bundle failure "Unable to resolve [path alias]..."
I expected the cjs file extension to have no effect on whether the module-resolver caused an error.
What resulted was the module-resolver being fixed once I renamed babel.config.cjs to babel.config.js

When navigating to "/elmah.axd" it throws a 'Root Element is missing' error

Posting this to resolve a question I couldn't find an answer to elsewhere.
I'm running "elmah" for error logging in a legacy .NET framework project. It works fine in all of my testing / production environments. However, navigating to it locally produces an XML error:
Root element is missing
within ProcessRequestMain, which seemed to be internal to elmah. Changing configuration didn't help, and I couldn't find a reference to this elsewhere, where it only didn't work locally.
The solution was to navigate to my logPath directory specified in the errorLog section of the web.config. Poking around the generated XML logfiles, I found that for some reason, one or two of them were actually malformed. This meant I couldn't launch the /elmah.axd page at all, without it throwing that error, presumably generated when it tried to parse them to display the page.
Deleting the offending logfiles resolved the issue.

Ember js warning with three.js

What is the correct way to use Ember js with three.js. I have tried using it with cdn by editing the index.html file which works fine but i get warning in ember-cli about THREE not being defined. Also installing it with bower and using app.import gave me similar warnings.
The app works all fine but i wanted to know what is the best way to import in this case three.js into an ember application without the warnings.
That is a JSHint warning because it isn't aware of the global THREE variable you're trying to access. You have two ways to fix it:
Put a globals directive at the top of the file that uses the variable.
Setup .jshintrc's predef.
Hope this helps!

Use ember-i18n with ember-cli production environment

I run into an issue where ember-i18n can be used with an ember-cli server running in development environment. But when I set --environment production I get the following error:
Error: The default Ember.I18n.compile function requires the full Handlebars. Either include the full Handlebars or override Ember.I18n.compile.
The error occurres because ember-cli includes Handlebars-production on production environment. Is there a solution for this problem?
I think I need to precompile the translations.
One way to fix this is to configure ember-cli to include the full handlebars version on production:
app.import({
development: 'vendor/handlebars/handlebars.js',
production: 'vendor/handlebars/handlebars.js'
});
A drawback is that the (much) bigger library is included in the build, only for my translations. I keep looking for a way to precompile my translations.
There is no way to get around importing the full handlebars when using ember-i18n. You do not need to specify the same string import for development and production though. Just add this to your Brocfile:
app.import('vendor/handlebars/handlebars.js');
I had exactly the same issue and this is the solution that Stefan Penner advised. https://github.com/stefanpenner/ember-cli/pull/675#issuecomment-47431195. Worked fine for me. One thing to note though, for some reason I had the import statement as the first import. When it was the last one it didn't seem to work. I didn't try anywhere in between though, or try to debug that issue.

JFolder: :folder: Path is not a folder. Path:

I'm receiving the following error JFolder: :folder: Path is not a folder. Path: (with no path) when i create a menu item based off a K2 item. Its a fresh install with only k2, Gantry Framework (with throws the same error on install), a template installed, and a few items created...
As you see from the tag its Joomla! version 2.5.14. The PHP allow_url_fopen setting is disabled. This setting must be enabled for the updater to work.
(this is because i'm using Yahoo Small Business and from my understanding they don't allow customization of php settings and i'll never use them again after my year is up).
I've seen the issues on temp and logs and they are both ./logs or ./tmp
The template also looks pretty messed up but works fine on another site i have.
Other than that its all pretty new. Anyone have a work around or fixes for what i'd doing?
Switch to a host that is set up to run Joomla. All of your errors are server configuration related.