Open MangoTsing opened 4 years ago
Same error.
ERROR in unknown: Unexpected token (16365:20)
Child html-webpack-plugin for "index.html":
Asset Size Chunks Chunk Names
index.html 533 KiB 0
Entrypoint undefined = index.html
[0] ./node_modules/html-webpack-plugin/lib/loader.js!./src/index.ejs 1.15 KiB {0} [built]
[1] ./node_modules/lodash/lodash.js 528 KiB {0} [built]
[2] (webpack)/buildin/module.js 497 bytes {0} [built]
error Command failed with exit code 1.
Error
OKAY take it away
electron-builder`
• electron-builder version=20.44.4
• loaded configuration file=package.json ("build" field)
• writing effective config file=build/builder-effective-config.yaml
Error: Unresolved node modules: vue
at /Users/yetianyue/vue-electron/machine-interconnection-terminal/node_modules/_app-builder-lib@20.44.4@app-builder-lib/src/util/packageDependencies.ts:112:21
at Generator.next (node .electron-vue/build.js && electron-builder
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the machine-interconnection-terminal@1.0.0 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! /Users/yetianyue/.npm/_logs/2020-06-16T01_08_05_702Z-debug.log`
I found a solution
Delete one of the lines webpack.renderer.config.js
const webpack = require('webpack')
// const MinifyPlugin = require("babel-minify-webpack-plugin") // delete
const CopyWebpackPlugin = require('copy-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
and
rendererConfig.plugins.push(
// new MinifyPlugin(), // delete
new CopyWebpackPlugin([]),
)
If you don't use this plugin, you can build normally
It may be that some grammars are not supported
Hope can help you
I think that you have install some node modules in devDependencies.But you should install it in dependencies
I installed a third-party library I can run successfully without installing it
The following is the source code address https://github.com/DataV-Team/Datav