我正在尝试学习反应,所以我有这个示例代码为fullstack反应投票应用程序,我试图让它工作,但在运行npm install后跟npm start我收到以下错误:
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "server"
npm ERR! node v7.5.0
npm ERR! npm v4.3.0
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! voting_app@1.1.0 server: `live-server --public --
host=localhost --port=3000 --middleware=./disable-browser-cache.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the voting_app@1.1.0 server script 'live-server --
public --host=localhost --port=3000 --middleware=./disable-browser-
cache.js'.
npm ERR! Make sure you have the latest version of node.js …Run Code Online (Sandbox Code Playgroud) 我在 state.js 文件中收到此错误(在 const 配置文件中的 => 处)无法理解为什么......感谢反馈
const credentials = {
email: '',
password: ''
}
const profile = {
=> userId: '',
gender: '',
firstName: '',
lastName: '',
address: '',
zipCode: '',
city: '',
country: 'France',
musician: false,
musicInstruments: [],
yearsPlaying: 0
}
export default {
credentials,
profile
}
Run Code Online (Sandbox Code Playgroud)
来自 vue-cli 的标准 eslint conf。网络包初始化
.eslintrc.js
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint'
},
env: {
browser: true,
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching …Run Code Online (Sandbox Code Playgroud)