Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Master
-
None
-
Just install and link latest master tools
Description
Cordova cannot add a test plugin to a project anymore:
cordova create foo cd foo cordova plugin add ../cordova-plugin-device cordova plugin add ../cordova-plugin-device/tests --verbose
This produces the following error:
Warning: using prerelease version 6.5.1-dev (cordova-lib@6.5.1-dev) No scripts found for hook "before_plugin_add". Calling plugman.fetch on plugin "../cordova-plugin-device/tests" saving Running command: cmd "/s /c ""C:\Program Files\nodejs\npm.cmd" install C:\Cordova\cordova-plugin-device\tests --save"" Command finished with error code 4294963228: cmd /s /c ""C:\Program Files\nodejs\npm.cmd" install C:\Cordova\cordova-plugin-device\tests --save" Error: CordovaError: Error: cmd: Command failed with exit code 4294963228 Error output: npm ERR! addLocal Could not install C:\Cordova\cordova-plugin-device\tests npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\v-alsoro\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "C:\\Cordova\\cordova-plugin-device\\tests" "--save" npm ERR! node v4.5.0 npm ERR! npm v3.10.10 npm ERR! code EISDIR npm ERR! errno -4068 npm ERR! syscall read npm ERR! eisdir EISDIR: illegal operation on a directory, read npm ERR! eisdir This is most likely not a problem with npm itself npm ERR! eisdir and is related to npm not being able to find a package.json in npm ERR! eisdir a package you are trying to install. npm ERR! Please include the following file with any support request: npm ERR! C:\Cordova\foo\node_modules\npm-debug.log at C:\Cordova\cordova-lib\cordova-fetch\index.js:95:25 at _rejected (C:\Cordova\cordova-lib\cordova-fetch\node_modules\q\q.js:844:24) at C:\Cordova\cordova-lib\cordova-fetch\node_modules\q\q.js:870:30 at Promise.when (C:\Cordova\cordova-lib\cordova-fetch\node_modules\q\q.js:1122:31) at Promise.promise.promiseDispatch (C:\Cordova\cordova-lib\cordova-fetch\node_modules\q\q.js:788:41) at C:\Cordova\cordova-lib\cordova-fetch\node_modules\q\q.js:604:44 at runSingle (C:\Cordova\cordova-lib\cordova-fetch\node_modules\q\q.js:137:13) at flush (C:\Cordova\cordova-lib\cordova-fetch\node_modules\q\q.js:125:13) at nextTickCallbackWith0Args (node.js:420:9) at process._tickCallback (node.js:349:13)