If I npm install Elm globally (with ‘-g’ flag), everything is great and it installs fine.
If I try to install it locally (without ‘-g’ flag) then it fails with lots of errors like this one, even when installing the exact same specific version. This also happens when installing via package.json and on the build server.
../fsevents.cc:50:32: error: no template named 'Handle' in namespace 'v8'
I’m trying out CircleCi, which doesn’t give me permissions to install globally on the build server, so I’m kind of stuck (although I could just use a different build server).
I use elm installed locally for my projects and it’s not an issue, so I don’t think that it’s related to that. However, if you do want to try installing it globally on your CI server, you should be able to change the location of your global NPM install directory: docs.npmjs.com/fixing-npm-permissions.md at master · mixonic/docs.npmjs.com · GitHub
It seems to be working this morning! Yesterday I saw this on the output
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v83-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for fsevents@1.2.4 and node@14.15.5 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
And I don’t see it today. So I think what happened is that the pre built binary wasn’t available to download yesterday, and building from source failed.
This morning the pre built binary is available, so that fact that it can’t compile from source doesn’t matter.
Just to clear potential confusion, note that this is pre-built binaries for fsevents, not Elm. So I suspect you try to install something else at the same time. Glad it works for you now!
Yeah, that is weird. There is clearly something I don’t understand about the way npm works. So probably if I hadn’t already installed elm-test then it would have worked, as Elm doesn’t depend on fsevents, and it wouldn’t have tried to do whatever it is doing here.
I need to about once a month reinstall xcode command line tools to fix this type of error. Not sure what breaks it. Maybe some behind the scenes update from Apple. Try that maybe…
Thanks Mika, I had in fact already done that I am fairly new to the Mac so still getting used to the idiosyncracies!
Matthieu put me on to elm-tooling , which I think I’m going to use in the future. It sounds a lot better in pretty much every way for getting the elm tools, both locally and on the build server.