Using a "broken" NPM module as a devDependency without compiling it

Viewed 38

I'm writing some code that wants to use some of the exported classes from https://github.com/f-list/exported because they describe datatypes that I'm trying to manipulate in my application, and I want to avoid writing my own copy of their datatypes and such.

However, that node module is extremely picky about the environment it will compile in, and I've spent over 10 hours trying to get it to successfully build to no avail. As a result, adding it as a devDependency results in a yarn install failure. I've managed to get it to compile in the past on another computer, so I know it's possible, but unfortunately the hard-drive to that machine died, so I don't have the exact configuration that worked.

Since I'm not using the compiled code, and I actually only want the typescript files, is there an npm/yarn based way to get that specific module to download, but not run it's build script on install?

I've already looked into passing yarn install --ignore-scripts, but that ignores all scripts for all modules, not just the scripts for that module, and I definitely need the rest of the modules compiled.

0 Answers
Related