question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"A hook ('orm') failed to load" on npm start

See original GitHub issue

When I run npm start I get the following error:

www@srv0:/opt/www/electron-release-server$ npm start

> electron-release-server@1.5.2 start /opt/www/electron-release-server
> node app.js

error: A hook (`orm`) failed to load!
error: error: column r.consrc does not exist
    at Connection.parseE (/opt/www/electron-release-server/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:539:11)
    at Connection.parseMessage (/opt/www/electron-release-server/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:366:17)
    at Socket.<anonymous> (/opt/www/electron-release-server/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:105:22)
    at Socket.emit (events.js:198:13)
    at Socket.EventEmitter.emit (domain.js:448:20)
    at addChunk (_stream_readable.js:288:12)
    at readableAddChunk (_stream_readable.js:269:11)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

I have tried following the advice of other issues like this, which is to install v2land-sails-pg-session, but that hasn’t worked for me.

Here is my local.js file:

module.exports = {
  appUrl: 'http://release.example.com',

  auth: {
    static: {
      username: 'Scribble',
      password: 'NotMyActualPassword'
    }
  },

  jwt: {
    token_secret: '63 random alpha-numeric characters'
  },

  connections: {
    postgresql: {
      adapter: 'sails-postgresql',
      host: 'my.pgserver.ip.address',
      user: 'electron_release_server_user',
      password: 'NotMyActualPassword',
      database: 'electron_release_server'
    }
  },

  session: {
    secret: '63 random alpha-numeric characters',
    database: 'electron_release_server_sessions',
    host: 'my.pgserver.ip.address',
    user: 'electron_release_server_user',
    password: 'NotMyActualPassword',
    port: 5432
  },

  files: {
    dirname: 'releases'
  }
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
issue-label-bot[bot]commented, Oct 27, 2020

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.84. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

1reaction
johnosbbcommented, Aug 23, 2021

Still broken on Ubuntu 20.04, tried to downgrade to postgresql-9.6 (now obsolete), hit other issues after this. Spent about 6 hours on this so giving up and assuming the project is now depreciated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sailjs error on user model : error: A hook (`orm`) failed to load
Means that there was an error in Users.js. Details:SyntaxError: Unexpected identifier. Usually is caused by a syntactic error, a missing comma ...
Read more >
A Hook ('Orm') Failed To Load! Sailsjs - ADocLib
Run the following commands: npm install npm start Here is the package.json: extensions.node module.js:597:18 at Module.load module.js:487:32 at. andriy 20121029 ...
Read more >
sails.load()
This takes care of loading configuration files, initializing hooks (including the ORM), and binding routes. It does not run the bootstrap, and it...
Read more >
start-server-and-test - npm
This command is meant to be used with NPM script commands. If you have a "start server", and "test" script names for example,...
Read more >
[Solved]-orm Failed To Load When Doing sails lift-node.js
I had the same problem with sails version 0.12 and had nodejs version 14. Try to install nodejs version 12.19.1. no solutions helped,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found