Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Unable to find sqlite3 when run #1348

Closed
paul90 opened this issue Mar 5, 2019 · 11 comments
Closed

Unable to find sqlite3 when run #1348

paul90 opened this issue Mar 5, 2019 · 11 comments

Comments

@paul90
Copy link
Contributor

paul90 commented Mar 5, 2019

Any folks building from source, feel free to give the new master a try and let me know how this refactor works for you. Hopefully there aren't too many new bugs or regressions.

Originally posted by @pfrazee in #1346 (comment)

Running npm start fails with Error: Cannot find module '/Users/Paul/Projects/dat/beaker/app/node_modules/@beaker/core/node_modules/sqlite3/lib/binding/electron-v4.0-darwin-x64/node_sqlite3.node'

The directory beaker/app/node_modules/@beaker/core/node_modules/sqlite3/lib/binding/electron-v4.0-darwin-x64 does not exist!

Looking at npm install output, node_sqlite3.node is getting installed in a different location beaker/app/node_modules/@beaker/core/node_modules/sqlite3/lib/binding/node-v64-darwin-x64

@paul90 paul90 changed the title 👍 This PR is ready to go. Merging now! Unable to find sqlite3 when run Mar 5, 2019
@paul90
Copy link
Contributor Author

paul90 commented Mar 5, 2019

Just spotted, the location of the module aside, the name of the file node-v64-darwin-x64 would suggest that the Electron 3 prebuilt version of sqlite3 is getting installed.

@pfrazee
Copy link
Member

pfrazee commented Mar 5, 2019

Did you try running npm run rebuild and/or npm run burnthemall ?

@paul90
Copy link
Contributor Author

paul90 commented Mar 5, 2019

I have tried both, tried npm run burnthemall after using rebuild failed.

@pfrazee
Copy link
Member

pfrazee commented Mar 5, 2019

You're on macos, right? Which version?

Are there any errors when you run rebuild ?

@paul90
Copy link
Contributor Author

paul90 commented Mar 5, 2019

Yes, macOS 10.14.3

While I don't see any sqlite3 errors in rebuild, in the install I see..

> sqlite3@4.0.6 install /Users/Paul/Projects/dat/beaker/app/node_modules/@beaker/core/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download 
[sqlite3] Success: "/Users/Paul/Projects/dat/beaker/app/node_modules/@beaker/core/node_modules/sqlite3/lib/binding/node-v64-darwin-x64/node_sqlite3.node" is installed via remote

In rebuild I see sodium-native install fail with an error finding libtool, even though the xcode cli tools are install, but no other errors.

@pfrazee
Copy link
Member

pfrazee commented Mar 5, 2019

Weird that this is suddenly happening, but try running brew install libtool autoconf automake

@pfrazee
Copy link
Member

pfrazee commented Mar 5, 2019

(And then rebuild again)

@paul90
Copy link
Contributor Author

paul90 commented Mar 5, 2019

Looks to have been a bit more complex than simply doing that brew install... As I have xcode installed brew install libtool as glibtool, so in itself it didn't solve anything..

However, creating a link so that brew installed libtool highlighted what was probably the real problem, libtoolize was missing. The brew install libtool failed as it was being passed invalid paramters.

Rebuild now runs, and I am able to start beaker, though I notice dat-serve Failed to load sodium-native. Performance may be degraded. Error: Cannot find module 'sodium-native'

@pfrazee
Copy link
Member

pfrazee commented Mar 5, 2019

Was there any error during the rebuild of sodium-native?

@paul90
Copy link
Contributor Author

paul90 commented Mar 5, 2019

No errors.

Not finding sodium-native looks to have been caused by my npm configuration, which contained global-style = true, so it was not in the expected place. Removing that setting resolves that issue.

Going to close this issue, as the build now completes and npm start starts beaker without any errors.

@paul90 paul90 closed this as completed Mar 5, 2019
@pfrazee
Copy link
Member

pfrazee commented Mar 5, 2019

Good deal, sorry for the issues!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants