react-native-make icon indicating copy to clipboard operation
react-native-make copied to clipboard

Unexpected token {

Open adrienthiery opened this issue 5 years ago • 5 comments

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?

adrienthiery avatar Dec 18 '19 09:12 adrienthiery

same issues

broke my rn cli

node -v v8.12.0

x5engine avatar Dec 19 '19 17:12 x5engine

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) {".

GHJaque avatar Jan 31 '20 15:01 GHJaque

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.

yleflour avatar Feb 28 '20 14:02 yleflour

broke my cli I am using v12 of node image

how to fix now

ashadnasim52 avatar Mar 15 '20 06:03 ashadnasim52

Can I get an error message? I won't deduce much out of a node version...

yleflour avatar Mar 16 '20 08:03 yleflour