Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

Cannot find module '../../node_modules/elementtree' #82

Closed
rmtngh opened this issue Jun 29, 2016 · 9 comments
Closed

Cannot find module '../../node_modules/elementtree' #82

rmtngh opened this issue Jun 29, 2016 · 9 comments

Comments

@rmtngh
Copy link

rmtngh commented Jun 29, 2016

When building for ios, I get this warning:

The module "ConfigParser" has been factored into "cordova-common". Consider update your plugin hooks.

followed by this error:

Error: Cannot find module '../../node_modules/elementtree'

manifest.json is created before adding plugin and elementtree exists in platforms\ios\cordova\node_modules

@boyofgreen
Copy link
Contributor

Thanks for the comment, can you provide us with the os, node version and plugin version you ate using?
Thanks,
Jeff

@rmtngh
Copy link
Author

rmtngh commented Jun 30, 2016

Hi Jeff,
I tried on windows 7 & Mac OSX El Capitan,
Windows:
node -v : 4.3.1
Mac :
node -v : 6.2.2


Plugin version : 0.3.0

I think I found the problem, node_modules is located in platforms/ios/cordova/node_modules, but in js files inside scripts folder of the plugin, the path is cordova-lib/node_modules. I changed cordova-lib to cordova and build was successful, but not sure yet if the plugin functions well.

Thanks,
Ramtin

@cometta
Copy link

cometta commented Aug 9, 2016

anyone manage to get this fix? I have this issue for android as well

@boyofgreen
Copy link
Contributor

are you using nvm by chance?

@cometta
Copy link

cometta commented Aug 9, 2016

@boyofgreen , nope i'm not using nvm.

node -v
v6.3.1
npm -v
3.10.5

@cometta
Copy link

cometta commented Aug 29, 2016

i found the problem, here is the solution

/project/cordova/plugins/cordova-plugin-hostedwebapp/scripts/updateConfigurationBeforePrepare.js
line 123: change to context.requireCordovaModule('elementtree');

/project/cordova/plugins/cordova-plugin-hostedwebapp/scripts/updateConfigurationAfterPrepare.js
line 32: change to context.requireCordovaModule('elementtree');

@boyofgreen
Copy link
Contributor

Thank you @cometta we have work starting soon, we'll get this fix in.

@bobalazek
Copy link

Any updates on this? Still having issues with that. I could fix the issue locally, the build happens in the ionic could, so the local fix doesn't really help. Any ideas?

@mattwoberts
Copy link

@boyofgreen why has this been closed, the error is still very much live....

mattwoberts added a commit to mattwoberts/ManifoldCordova that referenced this issue Aug 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants