Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run build 报错 #22

Open
ChinaParrot opened this issue Jun 28, 2019 · 3 comments
Open

npm run build 报错 #22

ChinaParrot opened this issue Jun 28, 2019 · 3 comments

Comments

@ChinaParrot
Copy link

[root@vultr frontend]# npm run build 

> [email protected] 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! [email protected] build: `webpack --progress --hide-modules --config build/webpack.prod.config.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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

@zhuzhuwonder
Copy link

[root@vultr frontend]# npm run build 

> [email protected] 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! [email protected] build: `webpack --progress --hide-modules --config build/webpack.prod.config.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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

解决了吗,我运行也是报错

@ZhianLin
Copy link

ZhianLin commented Jun 4, 2021

这个问题解决了吗?我的node是v13.9.0,是不是node版本的问题?

@ZhianLin
Copy link

ZhianLin commented Jun 4, 2021

根据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) {});
image

然后在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! [email protected] build: `webpack --progress --hide-modules --config build/webpack.prod.config.js`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the [email protected] 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/emmetcnpm install emmet/emmet都是卡主,npm源已经设置为淘宝镜像,但是打开淘宝npm会提示正在维护中,cnpm会返回github 404 这样的字眼。。。
折腾2个小时没有解决emmet/emmet这个报错,就直接去把源码压缩包see-master\frontend\dist里面的问题复制到/usr/local/seevenv/see-master/frontend/去,NGINX可以访问

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants