'Unexpected token issue in truffle on Windows
I am trying to install truffle on node version 8.9.0 and npm version 5.5.1. It got installed but am not able to do anything in that. every time I try any command, even try to unbox it shows an error.
C:\Users\com\AppData\Roaming\nvm\v8.9.0\node_modules\truffle\build\86.bundled.js:55160
} catch {
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:599:28)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.__webpack_require__.f.require (C:\Users\com\AppData\Roaming\nvm\v8.9.0\node_modules\truffle\build\cli.bundled.js:603:28)
Solution 1:[1]
the required node version is Node v12 or later. https://trufflesuite.com/docs/truffle/getting-started/installation/#requirements
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | NikolaiSch |