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

deprecation warnings when used with node v6.0.0 #634

Closed
mdouglass opened this issue Apr 26, 2016 · 17 comments
Closed

deprecation warnings when used with node v6.0.0 #634

mdouglass opened this issue Apr 26, 2016 · 17 comments

Comments

@mdouglass
Copy link

Using sqlite with node 6.0.0 (just released) gives numerous warnings likely because of the changes made to address nodejs/node#6216.

(node) v8::ObjectTemplate::Set() with non-primitive values is deprecated
(node) and will stop working in the next major release.

==== JS stack trace =========================================

Security context: 0x2ba0778c9fa9 <JS Object>#0#
    1: .node [module.js:568] [pc=0x34561141e264] (this=0x242bc69e2e59 <an Object with map 0x3ee4e1db53e9>#1#,module=0x1a9de2a804d1 <a Module with map 0x3ee4e1d181b9>#2#,filename=0x1a9de2a80499 <String[115]: /Users/mdouglass/kixeye/km/server/kmservices/node_modules/sqlite3/lib/binding/node-v48-darwin-x64/node_sqlite3.node>)
    2: load [module.js:~447] [pc=0x345611296e16] (this=0x1a9de2a804d1 <a Module with map 0x3ee4e1d181b9>#2#,filename=0x1a9de2a80499 <String[115]: /Users/mdouglass/kixeye/km/server/kmservices/node_modules/sqlite3/lib/binding/node-v48-darwin-x64/node_sqlite3.node>)
    3: tryModuleLoad(aka tryModuleLoad) [module.js:415] [pc=0x34561103899d] (this=0x2ba077804189 <undefined>,module=0x1a9de2a804d1 <a Module with map 0x3ee4e1d181b9>#2#,filename=0x1a9de2a80499 <String[115]: /Users/mdouglass/kixeye/km/server/kmservices/node_modules/sqlite3/lib/binding/node-v48-darwin-x64/node_sqlite3ease/method.js:39] [pc=0x345611c7dcdf] (this=0x274080472591 <JS Function Promise (SharedFunctionInfo 0x2cf6541298f1)>#15#,fn=0x1a9de276e6c1 <JS Function promises.push.Promise.try (SharedFunctionInfo 0x2cacd9561b59)>#16#)
   27: startServices(aka startServices) [/Users/mdouglass/kixeye/km/server/kmservices/lib/starter.js:28] [pc=0x345611c7d65f] (this=0x2ba077804189 <undefined>,services=0xb6382013d29 <JS Array[3]>#17#,config=0x232faff60ef1 <JS Object>#14#)
   28: /* anonymous */(aka /* anonymous */) [/Users/mdouglass/kixeye/km/server/kmservices/lib/starter.js:55] [pc=0x345611c7bea8] (this=0x2ba077804189 <undefined>)
   29: arguments adaptor frame: 1->0
   30: tryCatcher(aka tryCatcher) [/Users/mdouglass/kixeye/km/server/kmservices/node_modules/local-logger-service/node_modules/bluebird/js/main/util.js:26] [pc=0x3456113a830b] (this=0x2ba077804189 <undefined>)
   31: arguments adaptor frame: 1->0
   32: _settlePromiseFromHandler [/Users/mdouglass/kixeye/km/server/kmservices/node_modules/local-logger-service
==== C stack trace ===============================

 1: v8::Template::Set(v8::Local<v8::Name>, v8::Local<v8::Data>, v8::PropertyAttribute)
 2: node_sqlite3::Database::Init(v8::Local<v8::Object>)
 3: (anonymous namespace)::RegisterModule(v8::Local<v8::Object>)
 4: node::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&)
 5: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&))
 6: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>)
 7: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*)
 8: 0x345610f0961b
 9: 0x34561141e264
@springmeyer
Copy link
Contributor

Hmm, I think this is coming from https://github.com/mapbox/node-sqlite3/blob/155e45ef57e49398fa396c31bcad4a6607b49e3a/src/macros.h#L58-L63. I presume this needs to be fixed in https://github.com/nodejs/nan but I'm not sure.

@mdouglass
Copy link
Author

Yeah, I think so too, just opened nodejs/nan#558

@springmeyer
Copy link
Contributor

Watching fsevents/fsevents#128 too

@rs6g10
Copy link

rs6g10 commented Apr 27, 2016

+1

@BilalBoulifa
Copy link

+1 I was unable to install sqlite3 with node v6.

@frankhale
Copy link

Is there a way to suppress these warnings for now? I've tried --no-warnings and --no-deprecation but they still show up.

@frankhale
Copy link

Actually I think I figured out a way. I just rebuilt sqlite3 using nan 2.3.2 instead of the version it wants and the warnings go away. My app seems to be functioning fine.

@rs6g10
Copy link

rs6g10 commented Apr 28, 2016

as per frankhale's suggestion, using nan 2.3.2 does indeed fix the warnings.

@langpavel
Copy link

Works for me too:

npm install nan@^2.3.2
rm -rf node_modules/sqlite3/node_modules/nan/
npm rebuild sqlite3 --build-from-source

@zakdances
Copy link

zakdances commented Apr 28, 2016

My pull request should fix this. However AppVeyor is saying it failed tests on Windows with node version 0.10.40. Something to do with node-gyp? Don't know how this error is even related.

thhermansen added a commit to thhermansen/investoscope-update that referenced this issue May 2, 2016
@ghost ghost mentioned this issue May 2, 2016
@robogeek
Copy link

I wish to know what to put in the book I'm finishing. That is, I landed here due to testing the code for my book on Node.js 6.1, and getting errors like what's shown above. The book is all-but-finished and we're about to do the final round of editing (Node.js Web Development, 3rd edition) ...

In the book I'm telling readers to install specific versions of various packages. If they were to follow the directions but be using 6.x they'll get those errors.

It seems this specific fix is just a matter of updating the nan version dependency, and issuing a small release. I tried the workaround shown above and it worked fine. But I see other tickets on install problems on Windows and 6.x ...

I'd rather update the book with a new version number - but no suitable version exists at the moment - but may have to put in a couple sentences suggesting to use a later version.

@seeekr
Copy link

seeekr commented May 12, 2016

@robogeek Fork this repo to your own GH account, include the necessary changes, and link / point to that in your book? If you leave a sentence or two explaining this people should be fine? Like this you'd be in control of the situation, though you'd have to make sure people won't keep trying to use your fork forever but instead are notified to go back to the upstream version soon.

@frankhale
Copy link

What about @zakdances's pull request? It's been in the queue for 14 days with no response. Yeah AppVeyor is complaining but maybe somebody familiar with that setup can help resolve the pull request issues and it can be merged?

#635

@benjamn
Copy link

benjamn commented May 12, 2016

I can confirm that using @zakdances's fork solved this problem for Meteor. I know that's not enough to validate the changes, but at least they help!

@sudosean
Copy link

+1
I wanted to confirm that I have this problem and that running the npm commands from @langpavel worked

(node) v8::ObjectTemplate::Set() with non-primitive values is deprecated
(node) and will stop working in the next major release.

==== JS stack trace =========================================

Security context: 0x14c176bc9fa9 #0#
1: .node [module.js:568] [pc=0x22b78702de24](this=0x2307240e1229 <an Object with map 0xb22dfd17be1>#1#,module=0x1075253a1 <a Module with map 0xb22dfd181b9>#2#,filename=0x107525379 <String[101]: /Users/sea2574595/dev/Haystack/node_modules/sqlite3/lib/binding/node-v48-darwin-x64/node_sqlite3.node)
2: load [module.js:456] [pc=0x22b786e38e72](this=0x1075253a1 <a Module with map 0xb22dfd181b9>#2#,filename=0x107525379 <String[101]: /Users/sea2574595/dev/Haystack/node_modules/sqlite3/lib/binding/node-v48-darwin-x64/node_sqlite3.node)
3: tryModuleLoad(aka tryModuleLoad) [module.js:415] [pc=0x22b786e3899d](this=0x14c176b04189 ,module=0x1075253a1 <a Module with map 0xb22dfd181b9>#2#,filename=0x107525379 <String[101]: /Users/sea2574595/dev/Haystack/node_modules/sqlite3/lib/binding/node-v48-darwin-x64/node_sqlite3.node)
4: _load [module.js:407] [pc=0x22b786e345e2](this=0x2307240e11e1 <JS Function Module %28SharedFunctionInfo 0x2307240286b9%29>#3#,request=0x10751e5c1 <String[101]: /Users/sea2574595/dev/Haystack/node_modules/sqlite3/lib/binding/node-v48-darwin-x64/node_sqlite3.node>,parent=0x10731d6c1 <a Module with map 0xb22dfd181b9>#4#,isMain=0x14c176b04299 <false)
JS Function require (SharedFunctionInfo 0x230724058b79)>#6#,module=0x10731d6c1 <a Module with map 0xb22dfd181b9>#4#,__filename=0x10731d689 <String[66]: /Users/sea2574595/dev/Haystack/node_modules/sqlite3/lib/sqlite3.js>,__dirname=0x107321579 <String[55]: /Users/sea2574595/dev/Haystack/node_modules/sqlite3/lib>)
lect=0x107313771 #10#,sequelize=0x107223851 #11#)
{\n db[modelName].associate(db);\n }\n});\n\nsequelize.sync();\n\ndb.sequelize = sequelize;\ndb.Sequelize = Sequelize;\n\nmodule.exports = db;>,filename=0x294863880599 <String[46]: /Users/sea2574595/dev/Haystack/models/index.js>)
ompile [module.js:541] [pc=0x22b786e41944](this=0x294863880dc1 <a Module with map 0xb22dfd181b9>#16#,content=0x2948638812c1 <String[573]: var express = require%28'express'%29;nvar router = express.Router%28%29;nvar models = require%28'../models'%29;nn/* GET users listing. */nrouter.get%28'/', function%28req, res, next%29 {n res.send%28'respond with a resource'%29;n}%29;nnrouter.post%28'/', function %28req, res%29 {n console.log%28models%29;n// models.User.create%28{n// name: req.name,n// email: req.email,n// message: req.messagen// }%29.then%28function %28user%29 {n// res.json%28{created:'user created', user: user}%29;n// }%29n// console.log%28'PAYLOAD ----->', req.body%29;n// res.send%28'hello'%29;n }%29;nnnmodule.exports = router;n>,filename=0x294863880f89 <String[46]: /Users/sea2574595/dev/Haystack/routes/users.js)
189 ,path=0x23072405bde1 <String[14]: ./routes/users>)
5: /* anonymous */ [/Users/sea2574595/dev/Haystack/bin/www:7] [pc=0x22b786e41c69](this=0x2307240eac41 <an Object with map 0x3d3dea807b71>#24#,exports=0x2307240eac41 <an Object with map 0x3d3dea807b71>#24#,require=0x2307240eaa29 <JS Function require %28SharedFunctionInfo 0x230724058b79%29>#25#,module=0x2307240ea999 <a Module with map 0xb22dfd181b9>#23#,__filename=0x2307240eac01 <String[38]: /Users/sea2574595/dev/Haystack/bin/www>,__dirname=0x2307240eabd9 <String[34]: /Users/sea2574595/dev/Haystack/bin)
process with map 0xb22dfd5f2d9>#27#)

==== C stack trace ===============================

1: v8::Template::Set(v8::Localv8::Name, v8::Localv8::Data, v8::PropertyAttribute)
2: node_sqlite3::Database::Init(v8::Localv8::Object)
3: (anonymous namespace)::RegisterModule(v8::Localv8::Object)
4: node::DLOpen(v8::FunctionCallbackInfov8::Value const&)
5: v8::internal::FunctionCallbackArguments::Call(void ()(v8::FunctionCallbackInfov8::Value const&))
6: v8::internal::MaybeHandlev8::internal::Object v8::internal::(anonymous namespace)::HandleApiCallHelper(v8::internal::Isolate
, v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>)
7: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object*, v8::internal::Isolate)
8: 0x22b786d0961b
Segmentation fault: 11

@langpavel
Copy link

@seanlarge I believe maintainer wish clean all ugly compile-time warnings (or have no time?) before publish new release, sure @kkaefer, @yhahn, @tmcw, @springmeyer?
Mine is temporaly workaround, but is better than no action.

@springmeyer
Copy link
Contributor

node-sqlite3@3.1.4 has been released, which is the first one to support node v6.

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