C:\Users\Мiша\Desktop\starter>npm run dev
> forkify-project@1.0.0 dev C:\Users\Мiша\Desktop\starter
> webpack
Invalid configuration object. Webpack has been initialised using a configuration
object that does not match the API schema.
- configuration.output has an unknown property 'fileName'. These properties are
valid:
object { auxiliaryComment?, chunkCallbackName?, chunkFilename?, chunkLoadTime
out?, crossOriginLoading?, devtoolFallbackModuleFilenameTemplate?, devtoolLineTo
Line?, devtoolModuleFilenameTemplate?, devtoolNamespace?, filename?, futureEmitA
ssets?, globalObject?, hashDigest?, hashDigestLength?, hashFunction?, hashSalt?,
hotUpdateChunkFilename?, hotUpdateFunction?, hotUpdateMainFilename?, jsonpFunct
ion?, jsonpScriptType?, library?, libraryExport?, libraryTarget?, path?, pathinf
o?, publicPath?, sourceMapFilename?, sourcePrefix?, strictModuleExceptionHandlin
g?, umdNamedDefine?, webassemblyModuleFilename? }
-> Options affecting the output of the compilation. `output` options tell web
pack how to write the compiled files to disk.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! forkify-project@1.0.0 dev: `webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the forkify-project@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Мiша\AppData\Roaming\npm-cache\_logs\2019-09-19T13_20_44_7
30Z-debug.log
C:\Users\Мiша\Desktop\starter>
package.json
{
"name": "forkify-project",
"version": "1.0.0",
"description": "pizza-project",
"main": "index.js",
"scripts": {
"dev": "webpack"
},
"author": "Mikeliy",
"license": "ISC",
"devDependencies": {
"webpack": "^4.40.2",
"webpack-cli": "^3.3.9"
},
"dependencies": {}
}
Webpack config:
const path = require('path');
module.exports = {
entry: './src/js/index.js',
output: {
path: path.resolve(__dirname ,'dis'),
fileName: 'bundle.js'
},
mode: 'development',
};
error log :
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'dev' ]
2 info using npm@6.9.0
3 info using node@v10.16.3
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle forkify-project@1.0.0~predev: forkify-project@1.0.0
6 info lifecycle forkify-project@1.0.0~dev: forkify-project@1.0.0
7 verbose lifecycle forkify-project@1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle forkify-project@1.0.0~dev: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Мiша\Desktop\starter\node_modules\.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\nodejs\;;D:\Microsoft VS Code\bin;C:\Users\Мiша\AppData\Roaming\npm
9 verbose lifecycle forkify-project@1.0.0~dev: CWD: C:\Users\Мiша\Desktop\starter
10 silly lifecycle forkify-project@1.0.0~dev: Args: [ '/d /s /c', 'webpack' ]
11 silly lifecycle forkify-project@1.0.0~dev: Returned: code: 1 signal: null
12 info lifecycle forkify-project@1.0.0~dev: Failed to exec dev script
13 verbose stack Error: forkify-project@1.0.0 dev: `webpack`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid forkify-project@1.0.0
15 verbose cwd C:\Users\Мiша\Desktop\starter
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
18 verbose node v10.16.3
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error forkify-project@1.0.0 dev: `webpack`
22 error Exit status 1
23 error Failed at the forkify-project@1.0.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]