SyntaxError:意外的令牌导入

时间:2017-02-21 04:07:32

标签: node.js reactjs npm

C:\Users\direwolf\Documents\web\softvoda>npm start

> react-redux-starter-kit@3.0.0-alpha.1 start C:\Users\direwolf\Documents\web\softvoda
> better-npm-run start

running better-npm-run in C:\Users\direwolf\Documents\web\softvoda
Executing script: start

to be executed: "babel-node bin/server"
C:\Users\direwolf\Documents\web\softvoda\bin\server.js:1
(function (exports, require, module, __filename, __dirname) { import config from '../config';
                                                              ^^^^^^
SyntaxError: Unexpected token import
    at Object.exports.runInThisContext (vm.js:76:16)
    at Module._compile (module.js:542:28)
    at loader (C:\Users\direwolf\Documents\web\softvoda\node_modules\babel-register\lib\node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (C:\Users\direwolf\Documents\web\softvoda\node_modules\babel-register\lib\node.js:154:7)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Function.Module.runMain (module.js:604:10)
    at C:\Users\direwolf\Documents\web\softvoda\node_modules\babel-cli\lib\_babel-node.js:155:24
    at Object.<anonymous> (C:\Users\direwolf\Documents\web\softvoda\node_modules\babel-cli\lib\_babel-node.js:156:7)

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! react-redux-starter-kit@3.0.0-alpha.1 start: `better-npm-run start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-redux-starter-kit@3.0.0-alpha.1 start script 'better-npm-run start'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the react-redux-starter-kit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     better-npm-run start
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs react-redux-starter-kit
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls react-redux-starter-kit
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\direwolf\Documents\web\softvoda\npm-debug.log

我在节点和npm中都是noob。我正在尝试运行现有的反应项目。我到底做了什么?

0 个答案:

没有答案