-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Make better-sqlite3
/ caching feature an optional dependency
#49
Comments
Can you explain more? My understanding is that
And as a potentially helpful tip, I'd generally recommend that you never actually install software on your running servers. Just on your CI server, which builds all packages -- then tar that up, archive the artifact, and deploy the artifact to your servers -- to ensure that you never are at the mercy of realtime installs where things could go wrong / need to be shrinkwrap/package-lock'ed, etc. /cc @tptee |
It installs optional dependencies that goes to package-lock that only works on the os-x, then it fails to build in the CI, because the package-lock try to install the OS X optional dependency and exit 1.
My CI uses a Linux alpine with node only. I need the dev packages to create the build. I do not build in production, also I do not have python or other unnecessary stuff in production.
Anyway so far the solution is not to use this project as dev dependency for now.
You would be surprised how far you can go without node-gyp. I have been working in a few huge projects that does not have it as dependency.
…On Sep 20, 2017, 9:34 PM +0900, Ryan Roemer ***@***.***>, wrote:
Can you explain more? My understanding is that better-sqlite3 is fully cross-compatible on all OSes.
python is the basis of https://github.com/nodejs/node-gyp which has been around since forever IIRC as the basis of native bindings building. Are you saying that you'd like us to scrub all potential dependencies to make sure there are no native bindings anywhere?
And as a potentially helpful tip, I'd generally recommend that you never actually install software on your running servers. Just on your CI server, which builds all packages -- then tar that up, archive the artifact, and deploy the artifact to your servers -- to ensure that you never are at the mercy of realtime installs where things could go wrong / need to be shrinkwrap/package-lock'ed, etc.
/cc @tptee
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@gartz -- Hmmm... while it does seem awkward that you need to reach out to any project that has any transitive dependency on anything using (For example, |
Driving home the (nvm v8.3.0) rye@small ~/Desktop/temp-wp $ npm install webpack
> fsevents@1.1.2 install /Users/rye/Desktop/temp-wp/node_modules/fsevents
> node install
[fsevents] Success: "/Users/rye/Desktop/temp-wp/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
# ... SNIPPED ...
(nvm v8.3.0) rye@small ~/Desktop/temp-wp $ find node_modules | grep binding.gyp
node_modules/fsevents/binding.gyp ... and I'm strongly intuiting your build uses webpack given you're using this project 😉 |
I need to double check that, because before you add that to your project my webpack project wasn’t installing fsevents. It started with this update.
From all the dependencies I use here the only one that have fsevents is PM2, but that is available in the server and doesn’t need to be as dependency in the project.
About node-gyp, the last project that was using it was scss, but we don’t use that nowadays.
After you add this SQLite dependency, it came with fsevents, not sure why your webpack is installing fsevents, but here it’s not. It would break the build in the CI, it does everything it goes to the package-lock.
…On Sep 21, 2017, 1:28 AM +0900, Ryan Roemer ***@***.***>, wrote:
Driving home the chokidar example more concretely -- it's needed for webpack:
(nvm v8.3.0) ***@***.*** ~/Desktop/temp-wp $ npm install webpack
> ***@***.*** install /Users/rye/Desktop/temp-wp/node_modules/fsevents
> node install
[fsevents] Success: "/Users/rye/Desktop/temp-wp/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
# ... SNIPPED ...
(nvm v8.3.0) ***@***.*** ~/Desktop/temp-wp $ find node_modules | grep binding.gyp
node_modules/fsevents/binding.gyp
... and I'm strongly intuiting your build uses webpack given you're using this project 😉
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Because Yarn shows the deps:
So if you're planning on using and eventually upgrading webpack to this one, you'll have an optionaldep on |
And $ yarn add inspectpack
$ find node_modules | grep binding.gyp
node_modules/better-sqlite3/binding.gyp
node_modules/farmhash/binding.gyp
node_modules/integer/binding.gyp
$ cat yarn.lock | grep fsevents
# ... NO OUTPUT ... Side note: |
Indeed actually there are other dependencies that include fsevents as optional and it is present in my
This is what happens after:
Now let's see without it by running:
To be sure the only thing I removed was this project, because
Unsupported dependencies are trying to install in the linux build. No errors or warnings about the
As you mentioned, it is an I think that if you move those dependencies to optional, it would be great because I want to install in my OS-X but I don't need them to build the project in my controlled build environment on the CI server. Thank you for checking that and inspect all those packages. This is a great project and I like to use it if I can. |
better-sqlite3
/ caching feature an optional dependency
* Make `better-sqlite3` and `optionalDependency`. Switch to noop cache if not present. Fixes #49 * Add `Cache.wrapAction` helper for common use case of "try cache get, do action, set cache". * Change cross-process communication to just serialize/deserialize the applicable cache instance. * Various refactoring and cleanup. * Re-enabled eslint rules for better hamonized style. * Add `cache` option for `InspectpackDaemon.create`. * Add error logging for worker errors.
The latest version added a package
better-sqlite3
that depends oninteger@1.0.1
that requires python to run a script after install.Can we keep only JS dependencies, please? It makes easier to be cross-compatible.
The text was updated successfully, but these errors were encountered: