我正在努力解决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-comments
lib,我将其添加为依赖项,但仍然没有骰子。
有什么想法吗?帮助解决此错误?谢谢!
这里是我的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"
}
}