<head> code gets injected in <body> instead


I’ve tried two different ways of injecting code into my app’s <head> tag (adding it to an HTML file and using the static-html package; and using the inject-initial package), and I have the same problem with both methods: the code does get inserted, but at the end of <body> instead of the end of <head>.

Any idea what could be going on?

EDIT: I also tried the WebApp.rawConnectHandlers method outlined here, same thing.


It’s working properly for me. Where are you injecting your code? I’m using it like this (roughly):

import { Picker } from 'meteor/meteorhacks:picker'
import { Inject } from 'meteor/meteorhacks:inject-initial'
Picker.middleware((request, response, next) => {
  Inject.rawHead('title', `
    <title>blah blah</title>


A copy and paste of my post that you linked to still worked for me on a new project. Something else must be weird.