1

我在npm run build(webpack)步骤中苦苦挣扎。在我的机器上本地构建良好。但是在远程构建时,当它尝试构建 eslint 模块时出现错误。

错误如下: ERROR in ./app/app.module.js Module build failed: TypeError: Cannot read config file: D:\a\1\s\.eslintrc.json Error: stripComments is not a function

从挖掘它。我有一种感觉,它是我在本地安装的,但远程构建没有它。我试过清除 npm 缓存,删除我的本地 npm 模块。但我似乎无法在我的本地机器上进行复制。该功能似乎来自strip-json-commentslib,我将其添加为依赖项,但仍然没有骰子。

有任何想法吗?帮助解决此错误?谢谢!

这是我的 package.json ..

{
  "name": "My Dummy App",
  "version": "1.0.0",
  "private": true,
  "scripts": {
    "start": "node server.js",
    "build": "webpack",
    "watch": "webpack --watch"
  },
  "dependencies": {
    "Some Private Package": "^1.3.23",
    "request": "^2.87.0",
    "dotenv": "^6.0.0"
  },
  "devDependencies": {
    "babel-core": "^6.26.0",
    "babel-loader": "^7.1.2",
    "babel-preset-env": "^1.6.0",
    "eslint": "^4.15.0",
    "eslint-config-google": "^0.9.1",
    "eslint-loader": "^1.9.0",
    "eslint-plugin-import": "^2.8.0",
    "babel-plugin-angularjs-annotate": "^0.9.0",
    "node-sass": "^4.7.2",
    "webpack": "^3.5.5"
  }
}
4

0 回答 0