Reputation: 93
I'm trying to build my custom cordova plugin following these steps.
After running the command plugman createpackagejson .
from the folder where the plugin is located in, I get this error:
C:\Users\[UserName]\AppData\Roaming\npm\node_modules\plugman\node_modules\cordova-lib\node_modules\init-package-json\node_modules\read-package-json\node_modules\json-parse-better-errors\index.js:9
const syntaxErr = e.message.match(/^Unexpected token.*position\s+(\d+)/i)
^^^^^
Use of const in strict mode.
Any suggestion?
Upvotes: 0
Views: 746
Reputation: 3019
I just faced this issue and it looks like it is because of an older version of node.js. It looks like you are on Windows so check here for info on upgrading. https://www.npmjs.com/package/npm-windows-upgrade I ended up having to uninstall and reinstall Node to get it working as I could not get the upgrade to work.
Upvotes: 0