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

'TypeError: Model.update(...).meta is not a function' #4177

Closed
murbanowicz opened this issue Aug 26, 2017 · 14 comments
Closed

'TypeError: Model.update(...).meta is not a function' #4177

murbanowicz opened this issue Aug 26, 2017 · 14 comments

Comments

@murbanowicz
Copy link

murbanowicz commented Aug 26, 2017

Sails version: 1.0.0-37
Node version: 8.0
NPM version: 5.0
Operating system: Windows


When trying to use blueprints for update, it throws error and crashing.

path_to_my_project\node_modules\sails-mongo\node_modules\mongodb\lib\utils.js:98
process.nextTick(function() { throw err; });
^

TypeError: Model.update(...).meta is not a function
at found (path_to_my_project\node_modules\sails\lib\hooks\blueprints\actions\update.js:57:67)
at wrapper (path_to_my_project\node_modules\lodash\index.js:3592:19)
at applyInOriginalCtx (path_to_my_project\node_modules\waterline\lib\waterline\utils\normalize.js:421:80)
at wrappedCallback (path_to_my_project\node_modules\waterline\lib\waterline\utils\normalize.js:324:18)
at success (path_to_my_project\node_modules\switchback\lib\normalize.js:33:31)
at _switch (path_to_my_project\node_modules\switchback\lib\factory.js:58:28)
at returnResults (path_to_my_project\node_modules\waterline\lib\waterline\query\finders\basic.js:179:9)
at path_to_my_project\node_modules\waterline\lib\waterline\query\finders\basic.js:86:16
at path_to_my_project\node_modules\waterline\lib\waterline\query\finders\operations.js:83:7
at path_to_my_project\node_modules\async\lib\async.js:52:16
at Object.async.forEachOf.async.eachOf (path_to_my_project\node_modules\async\lib\async.js:236:30)
at Object.async.forEach.async.each (path_to_my_project\node_modules\async\lib\async.js:209:22)
at path_to_my_project\node_modules\waterline\lib\waterline\query\finders\operations.js:436:11
at path_to_my_project\node_modules\waterline\lib\waterline\query\finders\operations.js:574:5
at path_to_my_project\node_modules\async\lib\async.js:52:16
at Object.async.forEachOf.async.eachOf (path_to_my_project\node_modules\async\lib\async.js:236:30)
at Object.async.forEach.async.each (path_to_my_project\node_modules\async\lib\async.js:209:22)
at module.exports._buildChildOpts (path_to_my_project\node_modules\waterline\lib\waterline\query\finders\operations.js:464:9)
at module.exports._execChildOpts (path_to_my_project\node_modules\waterline\lib\waterline\query\finders\operations.js:432:8)
at path_to_my_project\node_modules\waterline\lib\waterline\query\finders\operations.js:81:10
at wrapper (path_to_my_project\node_modules\lodash\index.js:3592:19)
at applyInOriginalCtx (path_to_my_project\node_modules\waterline\lib\waterline\utils\normalize.js:421:80)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! parback@0.0.1 start: node app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the parback@0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\marek\AppData\Roaming\npm-cache_logs\2017-08-26T05_08_01_917Z-debug.log

Process finished with exit code 1

First attempts after update to 1.0. All working before.
Just found that sails-mongo npm is still on 0.12 which may be the root cause?

@sailsbot
Copy link

Hi @murbanowicz! It looks like you may have removed some required elements from the initial comment template, without which I can't verify that this post meets our contribution guidelines. To re-open this issue, please copy the template from here, paste it at the beginning of your initial comment, and follow the instructions in the text. Then post a new comment (e.g. "ok, fixed!") so that I know to go back and check.

Sorry to be a hassle, but following these instructions ensures that we can help you in the best way possible and keep the Sails project running smoothly.

*If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact inquiries@sailsjs.com

@murbanowicz
Copy link
Author

ok, fixed

@sailsbot
Copy link

Hi @murbanowicz! It looks like you may have removed some required elements from the initial comment template, without which I can't verify that this post meets our contribution guidelines. To re-open this issue, please copy the template from here, paste it at the beginning of your initial comment, and follow the instructions in the text. Then post a new comment (e.g. "ok, fixed!") so that I know to go back and check.

Sorry to be a hassle, but following these instructions ensures that we can help you in the best way possible and keep the Sails project running smoothly.

*If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact inquiries@sailsjs.com

@murbanowicz
Copy link
Author

ok,fixed

@sailsbot
Copy link

Hi @murbanowicz! It looks like you may have removed some required elements from the initial comment template, without which I can't verify that this post meets our contribution guidelines. To re-open this issue, please copy the template from here, paste it at the beginning of your initial comment, and follow the instructions in the text. Then post a new comment (e.g. "ok, fixed!") so that I know to go back and check.

Sorry to be a hassle, but following these instructions ensures that we can help you in the best way possible and keep the Sails project running smoothly.

*If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact inquiries@sailsjs.com

@murbanowicz
Copy link
Author

hopefully fixed? Shouldn't be looking for comments :/

@sailsbot
Copy link

Sorry to be a hassle, but it looks like your issue is still missing some required info. Please double-check your initial comment and try again.

*If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact inquiries@sailsjs.com

@Josebaseba
Copy link
Contributor

You have to install the sails-mongo@1.0.0-9 version and it should work properly.

@sgress454
Copy link
Member

@murbanowicz As @Josebaseba said, you need the 1.0-compatible version of sails-mongo, which you can get by doing npm install sails-mongo@beta, as detailed in the upgrade guide.

@sgress454 sgress454 reopened this Aug 29, 2017
@sgress454
Copy link
Member

Although come to think of it, it should not even lift Sails with a bad combination of Sails core and adapter...you might just need to clear your node_modules and NPM cache and re-install. Keeping this open in case this turns out to be something weirder.

@mikermcneil
Copy link
Member

@murbanowicz @Josebaseba @sgress454 Seems like this ought to be caught by sails-hook-orm before lift even completes though...

@sailsbot
Copy link

@murbanowicz,@sailsbot,@Josebaseba,@sgress454,@mikermcneil: Hello, I'm a repo bot-- nice to meet you!

It has been 30 days since there have been any updates or new comments on this page. If this issue has been resolved, feel free to disregard the rest of this message and simply close the issue if possible. On the other hand, if you are still waiting on a patch, please post a comment to keep the thread alive (with any new information you can provide).

If no further activity occurs on this thread within the next 3 days, the issue will automatically be closed.

Thanks so much for your help!

@sailsbot sailsbot added waiting to close This label is deprecated. Please don't use it anymore. and removed waiting to close This label is deprecated. Please don't use it anymore. labels Oct 17, 2017
@theoomoregbee
Copy link

Still getting this error. Tried

npm i sails-mongo@1.0.1

which is the latest version and also tried @Josebaseba's suggestion with @sgress454 (@beta version is not existing)

@hackthievist
Copy link

Still getting this error. Tried

npm i sails-mongo@1.0.1

which is the latest version and also tried @Josebaseba's suggestion with @sgress454 (@beta version is not existing)

same here, still not working.

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

No branches or pull requests

7 participants