Unable to build custom widgets using existing scripts in a Windows Environment
Description:
When following the documentation in [1], the scripts are failing due to following error when running 'npm run dev' command in a Windows Environment.
"'NODE_ENV' is not recognized as an internal or external command"
The best solution for make it platform independent is to install 'cross-env' dependency [2] and then make the package.json as below,
"dev": "npm run build & npm run symlink && cross-env NODE_ENV=development node_modules/.bin/webpack -d --config webpack.config.js --watch --progress"
In this way, the script will be compatible in both linux based environments and in Windows.
Suggested Labels: [APIM-3.1.0-GA], [Priority/Highest], [Type/Bug]
Affected Product Version:
APIM 3.1.0 Analytics
OS, DB, other environment details and versions:
Windows 2010, Ubuntu 16.0.4
[1] https://apim.docs.wso2.com/en/3.1.0/learn/analytics/creating-custom-widgets-in-analytics-dashboards/ [2] https://www.npmjs.com/package/cross-env