不知道如何运行* .js

时间:2018-11-06 02:16:37

标签: javascript node.js npm truffle

开始使用NPM

当我运行以下命令时,

我收到以下错误: npm安装

  

Windows脚本主机

     

第2行

     

字符1

     

预期对象

     

800A138F

     

Microsoft JScript运行时错误

truffle.js:

// Allows us to use ES6 in our migrations and tests.
require('babel-register')

module.exports = {
  networks: {
    ganache: {
      host: '127.0.0.1',
      port: 7545,
      network_id: '*' // Match any network id
    }
  }
}

package.json:

{
  "name": "truffle-init-webpack",
  "version": "0.0.2",
  "description": "Frontend example using truffle v3",
  "scripts": {
    "test": "truffle test",
    "lint": "eslint ./",
    "prepare": "truffle compile && npm test && npm run lint && webpack-cli --config ./webpack.config.js",
    "build": "npm install",
    "dev": "webpack-dev-server"
  },
  "author": "Douglas von Kohorn",
  "license": "MIT",
  "devDependencies": {
    "babel-cli": "^6.26.0",
    "babel-core": "^6.26.3",
    "babel-eslint": "^8.2.3",
    "babel-loader": "^7.1.4",
    "babel-plugin-transform-object-rest-spread": "^6.26.0",
    "babel-plugin-transform-react-jsx": "^6.24.1",
    "babel-plugin-transform-runtime": "^6.23.0",
    "babel-preset-env": "^1.7.0",
    "babel-register": "^6.26.0",
    "copy-webpack-plugin": "^4.5.1",
    "css-loader": "^0.28.11",
    "eslint": "^4.19.1",
    "eslint-config-standard": "^6.0.0",
    "eslint-plugin-babel": "^4.0.0",
    "eslint-plugin-mocha": "^4.8.0",
    "eslint-plugin-promise": "^3.0.0",
    "eslint-plugin-standard": "^2.0.0",
    "html-webpack-plugin": "^3.2.0",
    "json-loader": "^0.5.7",
    "node-sass": "^4.9.0",
    "sass-loader": "^7.0.3",
    "source-map-support": "^0.5.3",
    "style-loader": "^0.21.0",
    "truffle": "^4.1.13",
    "truffle-contract": "^3.0.6",
    "web3": "^0.20.0",
    "webpack": "^4.12.0",
    "webpack-cli": "^3.0.6",
    "webpack-dev-server": "^3.1.4"
  }
}

有人可以帮我吗?

谢谢!

0 个答案:

没有答案