I'm trying to deploy an app that makes use of the MRE SDK to Heroku. As of this writing, the SDK itself is broken, and attempting to run an npm run build
will result in an error.
A work around is to copy a modified animation.d.ts
file over to the resulting node_modules folder, after the install (specifically ./node_modules/@microsoft/mixed-reality-extension-sdk/built/animation/
).
I keep this file in a folder called v0.16_mre_fix
.
Without this, the build will fail. So I added this to my package.json
file.
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"clean": "tsc --build --clean",
"heroku-postbuild": "cp -i ./v0.16_mre_fix/*.ts ./node_modules/@microsoft/mixed-reality-extension-sdk/built/animation/",
"build": "tslint -p ./tsconfig.json src/**/*.ts && tsc --build",
"lint": "tslint -p ./tsconfig.json src/**/*.ts",
"start": "node .",
"debug": "node --nolazy --inspect-brk=9229 ."
},
According to heroku here, heroku-postbuild will be run after installing dependencies. This, however, did not work.
So I tried changing it to heroku-prebuild
and postinstall:
. They didn't work either.
Am I missing something?
EDIT: I also tried
"heroku-prebuild": "echo This runs before Heroku installs your dependencies.",
but I didn't see any echo in the ensuing git push.