Closed Aerex closed 7 years ago
Same problem for me
@blakgeek I've updated to the new version but I'm still getting the error. I'm using this in a plugin config.xml as follows
<dependency id="cordova-plugin-cocoapod-support"/>
<pods-config ios-min-version="8.0" use-frameworks="true"/>
<pod id="MyKit" git="https://github.com/blakgeek/something" branch="master" />
cordova -d platforms add ios
...
Executing script found in plugin cordova-plugin-cocoapod-support for hook "after_prepare": plugins/cordova-plugin-cocoapod-support/scripts/podify.js
Error: Cannot find module 'glob'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (/Users/janchaloupecky/xworkspace/cordova/cordova-sdk/sample/plugins/cordova-plugin-cocoapod-support/node_modules/shelljs/src/common.js:7:12)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
UPDATE: Solved by installing npm install -g glob
Aren't the dependencies supposed to be installed automatically? cheers
I'm getting the Error: Cannot find module 'glob'
error as well. I've tried npm install -g glob
, but that didn't fix it.
@joffreypeters
same problem for me with clean install of cordova project.
@joffreypeters @yeluolei What version of Cordova are you using? Can you verify that there is a a package.json file and node_modules directory in the root of the project?
This issue is caused because the shelljs dependencies are not being getting included.
Try running npm install --save shelljs
in the root of the project.
@blakgeek I am using Cordova 6.5. The issue has mysteriously disappeared for me. It's hard to say why, since I'm in such an early stage of development that I'm changing lots of things all the time.
I don't have a package.json file, though. Thanks for the help!
@blakgeek I am the same as @joffreypeters
When installing plugin via
cordova plugin add cordova-plugin-cocoapod-support
version 1.2.10 is fetched.With how it is now you will get the following error:
Cannot find module glob
version in
plugin.xml
needs to be updated to 1.2.13