I am trying to use the npm command:
pkg .
To create executable files for each OS to test my React app (a simple localhost:), index.js page
Although I get the error:
> Error! This experimental syntax requires enabling one of the following parser plugin(s): 'flow, typescript' (13:7)
\***\node_modules\ast-types-flow\lib\types.js
This could be becuase I have referenced a blank bin.js file but I think something else is needed...
I believe that a similar question was asked here Although I am unsure of the answered reply, by what 'removed unnecessary packages means'.
Could someone point me to the steps I need to take to fix this?
The start of my package.json is as follows:
{
"name": "web_application",
"version": "0.1.0",
"private": true,
"bin": "bin.js", //needs some file content?
"pkg": {
"assets": [".next/**/*"],
"scripts": [".next/dist/**/*.js"] //Unsure of exactly what I need to define here
},
Many thanks