Open ChinaParrot opened 5 years ago
[root@vultr frontend]# npm run build > iview-admin@1.3.1 build /root/see/frontend > webpack --progress --hide-modules --config build/webpack.prod.config.js clean-webpack-plugin: /root/see/frontend/dist/* has been removed. Happy[happybabel]: Version: 4.0.1. Threads: 1 (shared pool) fs.js:128 throw new ERR_INVALID_CALLBACK(); ^ TypeError [ERR_INVALID_CALLBACK]: Callback must be a function at maybeCallback (fs.js:128:9) at Object.write (fs.js:540:14) at /root/see/frontend/build/webpack.prod.config.js:16:8 at FSReqWrap.args [as oncomplete] (fs.js:140:20) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! iview-admin@1.3.1 build: `webpack --progress --hide-modules --config build/webpack.prod.config.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the iview-admin@1.3.1 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-06-28T07_09_09_510Z-debug.log [root@vultr frontend]# ls dist/clean-webpack-plugin ls: cannot access dist/clean-webpack-plugin: No such file or directory
解决了吗,我运行也是报错
这个问题解决了吗?我的node是v13.9.0,是不是node版本的问题?
根据https://blog.csdn.net/adminwudong/article/details/107513354
把see-master/frontend/build/webpack.prod.config.js 这个配置文件的第16行替换成下面的 fs.write(fd, buf, 0, 'utf-8', function(err, written, buffer) {});
然后在91% additional asset processing后报错,报错信息变成
ERROR in ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/my-components/sql/editor.vue
Module not found: Error: Can't resolve 'emmet/emmet' in '/home/download/see-master/frontend/src/views/my-components/sql'
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/my-components/sql/editor.vue 8:0-10:2
@ ./src/views/my-components/sql/editor.vue
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/sql/check.vue
@ ./src/views/sql/check.vue
@ ./src/router/router.js
@ ./src/main.js
Child html-webpack-plugin for "../index.html":
1 asset
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js?minimize!node_modules/autoprefixer-loader/index.js!node_modules/iview/dist/styles/iview.css:
Asset Size Chunks Chunk Names
2c2ae068be3b089e0a5b59abb1831550.eot 121 kB [emitted]
24712f6c47821394fba7942fbb52c3b2.ttf 189 kB [emitted]
05acfdb568b3df49ad31355b19495d4a.woff 67.9 kB [emitted]
621bd386841f74e0053cb8e67f8a0604.svg 334 kB [emitted] [big]
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! iview-admin@1.3.1 build: `webpack --progress --hide-modules --config build/webpack.prod.config.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the iview-admin@1.3.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-06-04T08_10_24_373Z-debug.log
然后执行npm install emmet/emmet
跟cnpm install emmet/emmet
都是卡主,npm源已经设置为淘宝镜像,但是打开淘宝npm会提示正在维护中,cnpm会返回github 404 这样的字眼。。。
折腾2个小时没有解决emmet/emmet这个报错,就直接去把源码压缩包see-master\frontend\dist里面的问题复制到/usr/local/seevenv/see-master/frontend/去,NGINX可以访问