So I am using webpack for a personal website. I followed a number of guides but none are working so far. Here is my log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build:dev' ]
2 info using npm@6.14.8
3 info using node@v12.13.0
4 verbose stack Error: missing script: build:dev
4 verbose stack
4 verbose stack Did you mean this?
4 verbose stack build
4 verbose stack at run (/usr/local/lib/node_modules/npm/lib/run-script.js:155:19)
4 verbose stack at /usr/local/lib/node_modules/npm/lib/run-script.js:63:5
4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:116:5
4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:436:5
4 verbose stack at checkBinReferences_ (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:391:45)
4 verbose stack at final (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:434:3)
4 verbose stack at then (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:161:5)
4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:377:16
4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:123:16
4 verbose stack at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:61:3)
5 verbose cwd /Users/santiagogutierrez/Documents/PersonalProjects/Personal Website/Portafolio
6 verbose Darwin 20.1.0
7 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build:dev"
8 verbose node v12.13.0
9 verbose npm v6.14.8
10 error missing script: build:dev
10 error
10 error Did you mean this?
10 error build
11 verbose exit [ 1, true ]
Here is my config file:
const path = require("path");
const HTMLWebPackPlugin = require("html-webpack-plugin");
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry:{
main:"./src/index.js"
},
output:{
path:path.resolve(__dirname,'./dist/'),
filename:'bundle.js'
},
module:{
rules:[
{
test:/\.html$/,
use:[
{
loader: "html-loader",
options:{
minimize:true
}
}
]
},
{
test: /\.css$/,
loader: 'css-loader'
}
]
},
plugins:[
new HTMLWebPackPlugin({
template:"./src/index.html",
source:"./index.html"
}),
]
}
Any help is appreciated. My index.js is empty except for a console.log statement. I am not sure what these "child compilation errors" are.
Aucun commentaire:
Enregistrer un commentaire