Skip to content
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

canfind #27

Open
onatbas opened this issue Sep 27, 2017 · 1 comment
Open

canfind #27

onatbas opened this issue Sep 27, 2017 · 1 comment

Comments

@onatbas
Copy link

onatbas commented Sep 27, 2017

Hi, I'm running node 6.9.1 and having quite a lot of problems with it.

First, let me tell that gulp, gulp-babel, babel-core dependencies are missing from package.json.

After you install it can configure your connections.js file to use this adapter, sails lift gives you the following error.

info: Could not find module: ejs in path: /Users/a212472385/Desktop/sky/datacollect/node_modules
error: A hook (orm) failed to load!
error: Error: There was an error attempting to load waterline-sqlite3.
(Sails attempted to load this adapter because it is referenced by a datastore (sqlitedb) in this app's configuration)
Please ensure that waterline-sqlite3 is a valid Sails/Waterline adapter, and that it is installed in this app.

Error details:

at constructError (/usr/local/lib/node_modules/sails/node_modules/sails-hook-orm/lib/construct-error.js:57:13)
at loadAdapterFromAppDependencies (/usr/local/lib/node_modules/sails/node_modules/sails-hook-orm/lib/load-adapter-from-app-dependencies.js:67:13)
at _eachRelevantDatastoreIdentity (/usr/local/lib/node_modules/sails/node_modules/sails-hook-orm/lib/initialize.js:141:56)
at arrayEach (/usr/local/lib/node_modules/sails/node_modules/lodash/index.js:1289:13)
at Function.<anonymous> (/usr/local/lib/node_modules/sails/node_modules/lodash/index.js:3345:13)
at Array.async.auto._attemptToLoadUnrecognizedAdapters (/usr/local/lib/node_modules/sails/node_modules/sails-hook-orm/lib/initialize.js:130:11)
at listener (/usr/local/lib/node_modules/sails/node_modules/sails-hook-orm/node_modules/async/lib/async.js:605:42)
at /usr/local/lib/node_modules/sails/node_modules/sails-hook-orm/node_modules/async/lib/async.js:544:17
at _arrayEach (/usr/local/lib/node_modules/sails/node_modules/sails-hook-orm/node_modules/async/lib/async.js:85:13)
at Immediate.taskComplete (/usr/local/lib/node_modules/sails/node_modules/sails-hook-orm/node_modules/async/lib/async.js:543:13)
at runCallback (timers.js:637:20)
at tryOnImmediate (timers.js:610:5)
at processImmediate [as _immediateCallback] (timers.js:582:5)

I don't know if it's indeed the name of the adapter or something else. But currently I can not get this working and need your help.

Best,
Onat

@christo-pr
Copy link

christo-pr commented Oct 11, 2017

I had this same problem, i fix it by changing the connection configurations file under config/connections.js and i just put

sqlitedb: {
      adapter: 'sqlite3', // -> put this instead 'waterline-sqlite3'
      filename: './dev-db.sqlite',
      debug: false
    }

That seem's to work, but im using knexJs to handle the migrations so i think something its not working fine with that because when i lift my app and go to postman to test it, only shows me

{
    "code": "E_UNKNOWN",
    "message": "Encountered an unexpected error",
    "data": {
        "raw": {}
    }
}

But i think, if your are not using knexJs, this will work for you.

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

No branches or pull requests

2 participants