You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However when building with --shadow, the runtime appears to be looking for another module:
[DEBUG] [iphone, 10.1, undefined] Native module:node_modules/qs
[ERROR] [iphone, 10.1, undefined] Couldn't find module: node_modules/qs for architecture: x86_64
[ERROR] [iphone, 10.1, undefined] TypeError: undefined is not an object (evaluating '__p.require("node_modules/qs").stringify')
So to reproduce: install this npm package (qs@5.2.0), and call it anywhere in your titanium code using require('node_modules/qs').stringify({foo: 'bar'});.
I can fix it using require('node_modules/qs/lib/index')... (direct reference to the bootstrap file) but I'm quite sure there's an underlying tishadow issue here.
I'm using Ti 6.0.1.GA, Alloy 1.9.5, and npm/qs@5.2.0
The text was updated successfully, but these errors were encountered:
I haven't used node_modules in a project before. I generally import a compiled lib directly.
I would need to modify the custom require.
It is on the TODO list.
@dbankier I dont think this is node_modules related, as I dont use node_modules. I think it has to do with the subfolder structure on the lib folder. so I have a folder called lib/something/somethingelse.js, and it says that "something" is not a native module
My app contains custom node modules which are installed into the
lib
directory, including:app/lib/node_modules/qs
which is a querystring module from npm, see https://www.npmjs.com/package/qs .However when building with
--shadow
, the runtime appears to be looking for another module:So to reproduce: install this npm package (qs@5.2.0), and call it anywhere in your titanium code using
require('node_modules/qs').stringify({foo: 'bar'});
.I can fix it using
require('node_modules/qs/lib/index')...
(direct reference to the bootstrap file) but I'm quite sure there's an underlying tishadow issue here.I'm using Ti 6.0.1.GA, Alloy 1.9.5, and npm/qs@5.2.0
The text was updated successfully, but these errors were encountered: