npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client@1.0.0 build-dev: `webpack --config webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client@1.0.0 build-dev 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! C:\Users\pires\AppData\Roaming\npm-cache\_logs\2020-08-17T11_53_05_458Z-debug.log
C:\Users\pires\Desktop\Javascript\projeto-webpack\client>npm run build-dev
> client@1.0.0 build-dev C:\Users\pires\Desktop\Javascript\projeto-webpack\client
> webpack --config webpack.config.js
internal/modules/cjs/loader.js:1032
throw err;
^
Error: Cannot find module 'C:\Users\pires\Desktop\Javascript\projeto-webpack\client\webpack.config.js'
Require stack:
- C:\Users\pires\Desktop\Javascript\projeto-webpack\client\node_modules\webpack\bin\convert-argv.js
- C:\Users\pires\Desktop\Javascript\projeto-webpack\client\node_modules\webpack\bin\webpack.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1029:15)
at Function.Module._load (internal/modules/cjs/loader.js:898:27)
at Module.require (internal/modules/cjs/loader.js:1089:19)
at require (internal/modules/cjs/helpers.js:73:18)
at requireConfig (C:\Users\pires\Desktop\Javascript\projeto-webpack\client\node_modules\webpack\bin\convert-argv.js:97:18)
at C:\Users\pires\Desktop\Javascript\projeto-webpack\client\node_modules\webpack\bin\convert-argv.js:104:17
at Array.forEach (<anonymous>)
at module.exports (C:\Users\pires\Desktop\Javascript\projeto-webpack\client\node_modules\webpack\bin\convert-argv.js:102:15)
at Object.<anonymous> (C:\Users\pires\Desktop\Javascript\projeto-webpack\client\node_modules\webpack\bin\webpack.js:155:40)
at Module._compile (internal/modules/cjs/loader.js:1200:30) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\pires\\Desktop\\Javascript\\projeto-webpack\\client\\node_modules\\webpack\\bin\\convert-argv.js',
'C:\\Users\\pires\\Desktop\\Javascript\\projeto-webpack\\client\\node_modules\\webpack\\bin\\webpack.js'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client@1.0.0 build-dev: `webpack --config webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client@1.0.0 build-dev 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! C:\Users\pires\AppData\Roaming\npm-cache\_logs\2020-08-17T11_57_52_202Z-debug.log
Meu package j.son
{
"name": "client",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build-dev": "webpack --config webpack.config.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"reflect-metadata": "^0.1.10"
},
"devDependencies": {
"babel-core": "^6.25.0",
"babel-loader": "^7.1.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-es2017": "^6.24.1",
"webpack": "^3.1.0"
}
}
meu webpack.config
const path=require('path');
module.exports = {
entry:'./app-src/app.js',
output:{
filename:'bundle.js',
path:path.resolve(__dirname, 'dist')
},
module:{
rules:[
{
test: /\.js$/,
exclude:/node_modules/,
use:{
loader:'babel-loader'
}
}
]
}
}