引入高德地图的API时不显示地图,把URL地址放在浏览器上可以正常显示地图,就是调用到手机上显示不出来,总是报这个错: /usr/local/bin/node /Users/zhanghelin/Desktop/myProject/toilet/index.ios.js /Users/zhanghelin/Desktop/myProject/toilet/index.ios.js:1 (function (exports, require, module, __filename, __dirname) { import React, { Component } from ‘react’; ^^^^^^
SyntaxError: Unexpected token import at createScript (vm.js:80:10) at Object.runInThisContext (vm.js:139:10) at Module._compile (module.js:599:28) at Object.Module._extensions…js (module.js:646:10) at Module.load (module.js:554:32) at tryModuleLoad (module.js:497:12) at Function.Module._load (module.js:489:3) at Function.Module.runMain (module.js:676:10) at startup (bootstrap_node.js:187:16) at bootstrap_node.js:608:3
Process finished with exit code 1
react native吗?
对了,以后代码最好用markdown语法,这样好排版
import 语法没编译到位~ 迄今为止,大多数时候,我还是 babel-preset-es2015 + stage1