Closed adrienthiery closed 4 years ago
š
What's going on?
Ignite plugins seems to fail removing themselves (when using yarn, anyway).
yarn
$ ignite remove code-push --debug š Verifying Plugin āļø uninstalling react-native-code-push āļø removing Removing dev module TypeError: Cannot read property 'exec' of undefined - remove.js:65 removeDependency [global]/[ignite-cli]/build/commands/remove.js:65:27 - remove.js:144 Command.<anonymous> [global]/[ignite-cli]/build/commands/remove.js:144:25 - remove.js:32 step [global]/[ignite-cli]/build/commands/remove.js:32:23 - remove.js:13 Object.next [global]/[ignite-cli]/build/commands/remove.js:13:53 - remove.js:4 fulfilled [global]/[ignite-cli]/build/commands/remove.js:4:58 /Users/osedea/.config/yarn/global/node_modules/gluegun/build/index.js:13 throw up; ^ TypeError: Cannot read property 'exec' of undefined at removeDependency (/Users/osedea/.config/yarn/global/node_modules/ignite-cli/build/commands/remove.js:65:27) at Command.<anonymous> (/Users/osedea/.config/yarn/global/node_modules/ignite-cli/build/commands/remove.js:144:25) at step (/Users/osedea/.config/yarn/global/node_modules/ignite-cli/build/commands/remove.js:32:23) at Object.next (/Users/osedea/.config/yarn/global/node_modules/ignite-cli/build/commands/remove.js:13:53) at fulfilled (/Users/osedea/.config/yarn/global/node_modules/ignite-cli/build/commands/remove.js:4:58)
remove.js relevant part:
remove.js
38 var shelljs_1 = require("shelljs"); ... 59 var removeDependency = function (moduleName) { 60 console.warn('Removing dev module'); 61 if (useYarn) { 62 shelljs_1.default.exec("yarn remove " + moduleName, { silent: true }); 63 } 64 else { // shelljs_1.default does not seem to exist? 65 shelljs_1.default.exec("npm rm " + moduleName + " --save-dev", { silent: true }); 66 } 67 };
This is very strange because shelljs_1 is defined with all the methods on. Just shelljs1.default is missing.
shelljs_1
shelljs1.default
Steps to reproduce
// Create a new project from `react-native init` react-native init MyTest ignite attach ignite add intl ignite remove intl
ignite doctor results:
ignite doctor
System platform darwin arch x64 cpu 4 cores Intel(R) Core(TM) i5-6360U CPU @ 2.00GHz directory MyTest /Users/osedea/Projects/OSEDEA/Test/MyTest JavaScript node 12.13.0 /Users/osedea/.nvm/versions/node/v12.13.0/bin/node npm 6.12.0 /Users/osedea/.nvm/versions/node/v12.13.0/bin/npm yarn 1.19.2 /usr/local/bin/yarn Ignite ignite-cli 3.3.1 /usr/local/bin/ignite ignite src build /Users/osedea/.config/yarn/global/node_modules/ignite-cli/build createdWith 3.3.1 boilerplate empty boilerplateVersion - generators {} Android java 1.8.0_222 /usr/bin/java android home - /Users/osedea/Library/Android/sdk iOS xcode 11.2.1 cocoapods 1.7.5 /Users/osedea/.rbenv/shims/pod
Submitted PR @adrienthiery.
:tada: This issue has been resolved in version 3.3.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
š
What's going on?
Ignite plugins seems to fail removing themselves (when using
yarn
, anyway).remove.js
relevant part:This is very strange because
shelljs_1
is defined with all the methods on. Justshelljs1.default
is missing.Steps to reproduce
ignite doctor
results: