Closed ramijarrar closed 5 years ago
Packages with binary dependencies cannot always be compiled in place on App Service (see https://docs.microsoft.com/en-us/azure/nodejs-use-node-modules-azure-apps#native-modules)
The culprit in this case is the tiny-secp256k1 package, I get the following error with a clean repro:
2019-04-02T03:12:20.2665570Z,> tiny-secp256k1@1.0.1 install D:\local\Temp\8d6b7181aba6a4a\bundle\programs\server\npm\node_modules\tiny-secp256k1,,0
2019-04-02T03:12:20.3001659Z,> node-gyp rebuild,,0
2019-04-02T03:12:20.3001659Z,,,0
2019-04-02T03:12:20.7822032Z,,,0
2019-04-02T03:12:20.8134208Z,D:\local\Temp\8d6b7181aba6a4a\bundle\programs\server\npm\node_modules\tiny-secp256k1>if not defined npm_config_node_gyp (node "D:\home\meteor-azure\nvm\v8.15.1\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "D:\home\meteor-azure\nvm\v8.15.1\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) ,,0
2019-04-02T03:12:38.7460895Z,Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.,,0
2019-04-02T03:12:39.1991096Z,D:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.props(28,3): error MSB4019: The imported project "D:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Redirect.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [D:\local\Temp\8d6b7181aba6a4a\bundle\programs\server\npm\node_modules\tiny-secp256k1\build\secp256k1.vcxproj],,0
Are you able to remove or switch out tiny-secp256k1 with something more popular/with precompiled binaries (e.g secp256k1-node)?
For reference, either of these 2 issues would address this: https://github.com/bitcoinjs/tiny-secp256k1/issues/26, https://github.com/bitcoinjs/tiny-secp256k1/issues/34
Thanks! I started investigating this. I am doing my own local tests and also opened issue https://github.com/RocketChat/Rocket.Chat/issues/13972 with our friends at Rocket Chat.
Great to hear - in general I would pick libraries with precompiled binaries (which is fairly commonplace nowadays) though we do have a basic toolchain since https://github.com/projectkudu/kudu/issues/1076.
FYI you can fork the default server initialisation script if you want to experiment with modifying/configuring the build environment.
We haven't documented this yet, but as of v2.1.0 we accept a "customServerInitRepo" option in the settings file:
{
"meteor-azure": {
"customServerInitRepo": "https://github.com/example/repo.git",
...
}
}
Thanks! I will be following it up!
By the way... thanks for this great tool! It is simple to use and the documentation is awesome. Really a great work!
Originally reported by @juliomac in https://github.com/fractal-code/meteor-azure/issues/64#issuecomment-478708581