Unrecognized command "set-icon" #6
Comments
Hello, is @bam.tech/react-native-make listed as a dev dependency in your react-native project? To check if it works, |
Same error here. In package.json: "devDependencies": {
"@bam.tech/react-native-make": "1.0.1-rc2", React Native versión is 0.59.10 Hope this helps clarify |
Can you copy/paste the output when running Edit: For those encountering the issue I believe we are only compatible with up to date installs of react-native-cli. I'm waiting for confirmation but running |
|
Ok, same here, so wrong hypothesis. Can you give me the output of |
Here is the output:
Just in case it helps, my whole package.json: {
"name": "DPE",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest",
"clean": "rm -rf $TMPDIR/react-* && watchman watch-del-all && npm cache clean --force",
"clean:android": "cd android/ && ./gradlew clean && cd .. && react-native run-android",
"newclear": "rm -rf $TMPDIR/react-* && watchman watch-del-all && rm -rf ios/build && rm -rf node_modules/ && npm cache clean --force && npm i",
"test:watch": "jest --watch",
"updateSnapshot": "jest --updateSnapshot",
"coverage": "jest --coverage && open coverage/lcov-report/index.html || xdg-open coverage/lcov-report/index.html",
"android:build": "cd android && ./gradlew assembleRelease",
"android:install": "cd android && ./gradlew assembleRelease && ./gradlew installRelease",
"android:hockeyapp": "cd android && ./gradlew assembleRelease && puck -submit=auto app/build/outputs/apk/app-release.apk",
"android:devices": "$ANDROID_HOME/platform-tools/adb devices",
"android:logcat": "$ANDROID_HOME/platform-tools/adb logcat *:S ReactNative:V ReactNativeJS:V",
"android:shake": "$ANDROID_HOME/platform-tools/adb devices | grep '\\t' | awk '{print $1}' | sed 's/\\s//g' | xargs -I {} $ANDROID_HOME/platform-tools/adb -s {} shell input keyevent 82",
"storybook": "storybook start -p 7007",
"lint": "standard --verbose | snazzy",
"lintdiff": "git diff --name-only --cached --relative | grep '\\.js$' | xargs standard | snazzy",
"fixcode": "standard --fix",
"git-hook": "npm run lint -s && npm run test -s"
},
"dependencies": {
"@react-native-community/async-storage": "1.6.1",
"apisauce": "1.0.3",
"format-json": "1.0.3",
"i18n-js": "3.3.0",
"identity-obj-proxy": "3.0.0",
"lodash": "4.17.15",
"prop-types": "15.7.2",
"querystringify": "2.1.1",
"ramda": "0.26.1",
"react": "16.8.3",
"react-native": "0.59.10",
"react-native-config": "0.11.7",
"react-native-device-info": "2.3.2",
"react-native-fast-image": "6.1.1",
"react-native-firebase": "5.5.6",
"react-native-gesture-handler": "1.3.0",
"react-native-localize": "1.1.4",
"react-native-permissions": "1.2.0",
"react-native-splash-screen": "3.2.0",
"react-native-status-bar-height": "2.4.0",
"react-native-vector-icons": "6.6.0",
"react-native-webview": "5.8.2",
"react-navigation": "3.11.1",
"react-navigation-redux-helpers": "3.0.2",
"react-redux": "6.0.1",
"redux": "4.0.4",
"redux-persist": "5.10.0",
"redux-saga": "1.0.5",
"reduxsauce": "1.1.0",
"seamless-immutable": "7.1.4"
},
"devDependencies": {
"@babel/core": "7.5.5",
"@babel/runtime": "7.5.5",
"@bam.tech/react-native-make": "1.0.1-rc2",
"@storybook/addon-actions": "5.0.11",
"@storybook/addon-links": "5.0.11",
"@storybook/addon-storyshots": "4.1.18",
"@storybook/addons": "4.1.18",
"@storybook/channels": "4.1.18",
"@storybook/react-native": "4.1.18",
"babel-core": "6.26.3",
"babel-eslint": "7.1.1",
"babel-jest": "24.8.0",
"babel-plugin-ignite-ignore-reactotron": "0.3.0",
"babel-preset-env": "1.7.0",
"babel-preset-react-native": "4.0.1",
"enzyme": "3.10.0",
"enzyme-adapter-react-16": "1.14.0",
"ignite-andross": "4.1.0",
"ignite-redux-persist": "2.0.0",
"ignite-standard": "1.0.0",
"jest": "24.8.0",
"metro-react-native-babel-preset": "0.55.0",
"mockery": "2.1.0",
"react-devtools-core": "3.6.0",
"react-dom": "16.7.0",
"react-test-renderer": "16.8.3",
"reactotron-react-native": "2.2.0",
"reactotron-redux": "2.1.3",
"reactotron-redux-saga": "3.0.0",
"snazzy": "8.0.0",
"standard": "10.0.2"
},
"jest": {
"preset": "react-native",
"testMatch": [
"<rootDir>/Tests/**/*.js",
"**/?(*.)(spec|test).js?(x)"
],
"testPathIgnorePatterns": [
"/node_modules/",
"<rootDir>/Tests/Setup.js"
],
"moduleNameMapper": {
"^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "identity-obj-proxy"
},
"transform": {
"^.+\\.(js)$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"
},
"setupFiles": [
"<rootDir>/Tests/Setup"
]
},
"config": {},
"standard": {
"parser": "babel-eslint",
"globals": [
"describe",
"test",
"jest",
"expect",
"fetch",
"navigator",
"__DEV__",
"XMLHttpRequest",
"FormData",
"React$Element"
]
},
"rnpm": {
"assets": [
"./assets/fonts"
]
}
} |
Thanks, also, which platform are you working on? Windows? Mac? Linux? |
Here goes with all other versions I think may help 😄 : |
I am completely unable to reproduce the issue. If you are able to dig in, the way it works is that when running "react-native " in a RN project's folder, it loads up node_modules checking against the presence of a react-native.config.js file in the root folder. This file should export a valid config. Can you replace your #!/usr/bin/env node
const { resolve } = require('path');
const { lstatSync } = require('fs');
/**
* For faster development workflow, when npm linked
* we want this library to be transpiled at runtime using the ts-node resolver
*/
try {
const res = lstatSync(resolve('.', 'node_modules', '@bam.tech', 'react-native-make'));
if (res.isSymbolicLink()) {
console.warn('Detected linked install of react-native-make, compiling at runtime...');
require('ts-node').register({ project: resolve(__dirname, `tsconfig.json`) });
module.exports = require('./src/rn-plugin.config').rnPluginConfig;
} else {
const pluginConfig = require('./dist/rn-plugin.config.js').rnPluginConfig;
console.warn(pluginConfig);
module.exports = pluginConfig;
}
} catch (err) {
console.warn(err);
} |
I'm getting the same issue on macOS 10.14.6, after editing
|
Ok. First, just in case, this is the code before editing node_modules/@bam.tech/react-native-make/react-native.config.js: #!/usr/bin/env node
const { resolve } = require('path');
const { lstatSync } = require('fs');
/**
* For faster development workflow, when npm linked
* we want this library to be transpiled at runtime using the ts-node resolver
*/
const res = lstatSync(resolve('.', 'node_modules', '@bam.tech', 'react-native-make'));
if (res.isSymbolicLink()) {
console.warn('Detected linked install of react-native-make, compiling at runtime...');
require('ts-node').register({ project: resolve(__dirname, `tsconfig.json`) });
module.exports = require('./src/rn-plugin.config').rnPluginConfig;
} else {
module.exports = require('./dist/rn-plugin.config.js').rnPluginConfig;
} After editing:
|
Thank you so much for taking the time to dig in. It seems the plugin is not even loaded. This could be confirmed with a I found out about the I'm going to dig in how react-native-cli actually detects installed plugins |
Okay, I was able to reproduce the bug by starting a project with react-native@0.59.10 The CLI used seems to be the one installed locally instead of the global one which is incompatible with the configuration in react-native-make. I will be working on a workaround |
Just added a compat layer for react-native-cli@1.x and published it in 1.0.2. I will be waiting for confirmation to close the issue |
It works after the update, great job! |
Working here too! 👏 🥂 |
Guess this is officially closed 💥 |
Bumped in the same issue using: @yleflour
using macOS 10.14.6, npm 6.11.3, node 10.16.3 |
Also running into the same issue as @efstathiosntonas
Any thoughts? |
Hello, @efstathiosntonas , I am unable to reproduce the issue: What I did: react-native init TestProject --version 0.61.0-rc.3
cd TestProject
yarn add -D @bam.tech/react-native-make
react-native -h
# Check: The "make" commands are displayed Are you able to reproduce it on another project? |
I ll check again first thing tomorrow morning and I will post back. I’m guessing the issue occurred because i jumped from 0.60.5 to rc3 via the upgrade tool and some packages might be messed up, I’ll delete node_modules and try again. |
Hey, I used
and when I run
Is there a way to run it out of react-native-cli? |
OK, I suspected that, but thought that could not be the problem, but yes. I used |
Just published a fix in 1.0.3 With Yarn, node_modules folder architecture is flat whereas with NPM it is nested |
Thanks @yleflour for fixing it so quick. Sorry for not posting back. |
After installing via npm, I am unable to run
react-native set-icon
, I get this error:The text was updated successfully, but these errors were encountered: