- 導入ES6 NPM模塊時,我創建使用
meteor create
- 我跑
npm install -S spacy-nlp
一個新流星的項目,其中包含一些ES6代碼 - 在我
server/main.js
,我寫import spacy from 'spacy-nlp'
- 在運行
meteor
,它抱怨Error: The babel-runtime npm package could not be found in your node_modules. Please run the following command to install it: meteor npm install --save babel-runtime
- 我安裝
babel-runtime
然後它抱怨的SyntaxError流星
W20161120-16:40:30.175(8)? (STDERR) /Users/prashanthcr/code/es6-meteor-test/node_modules/spacy-nlp/src/start-io.js:3 W20161120-16:40:30.176(8)? (STDERR) const { spawn } = require('child_process') W20161120-16:40:30.176(8)? (STDERR) ^ W20161120-16:40:30.177(8)? (STDERR) W20161120-16:40:30.178(8)? (STDERR) SyntaxError: Unexpected token {
不知道從哪裏裏去。爲什麼我無法導入使用ES6的npm軟件包?
我在全球安裝了Node.js 7.1.0,我使用的是Meteor 1.4.2.3。
我提到我已經看過該指令並安裝了它 –