react-native-make
react-native-make copied to clipboard
Unexpected token {
warn Package @bam.tech/react-native-make has been ignored because it contains invalid configuration. Reason: Unexpected token {
error Unrecognized command "set-icon".
info Run "react-native --help" to see a list of all available commands.
Found out it comes from :
node node_modules/@bam.tech/react-native-make/react-native.config.js
node_modules/@bam.tech/react-native-make/dist/rn-plugin.config.js:12
catch {
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/osedea/Projects/Verifik8/Verifik8/node_modules/@bam.tech/react-native-make/react-native.config.js:15:20)
On node v8.16.0
.
Works with node v12.13.0
.
Should there be an engine
attribute in the package.json
? Or compiled to be compatible with a lower version of node?
same issues
broke my rn cli
node -v
v8.12.0
node node_modules/@bam.tech/react-native-make/react-native.config.js node_modules/@bam.tech/react-native-make/dist/rn-plugin.config.js:12 catch { ^ SyntaxError: Unexpected token {
Try modifying the line to "catch (error) {".
Will be switching to a ES2017 target to solve the issue.
Outside of that, please note that Node 8 is not supported anymore. I truly recommend that you switch to the latest LTS as soon as you can.
broke my cli
I am using v12 of node
how to fix now
Can I get an error message? I won't deduce much out of a node version...