After installing Webpack, execute the webpack-v command times incorrectly as follows:
[[email protected] ~]# webpack -v/usr/local/node-v4.4.7-linux-x64/lib/node_modules/webpack/bin/webpack.js:3let webpackCliInstalled = false;^^^SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:373:25) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Function.Module.runMain (module.js:441:10) at startup (node.js:139:18) at node.js:968:3
This is because the Nodejs version is too low, or the Webpack version is too high, I use the Nodejs version is 4.4.7, the default installation of Webpack version is 4.3.0, so incompatible. Then I uninstalled the webpack and reinstalled the 2.6.1 version of Webpack, problem solving:
After installing Webpack, execute webpack-v command times wrong: SYNTAXERROR:BLOCK-SC