I create desktop application by using electron, and tried electron-packager. But electron-packager doesn't package node modules which names are started from "@" (Example: @turf, @mapbox)
In node_modules folder of developing folder, I can find "@turf" and "@mapbox".
But after running
>electron-packager . MaplatEditor --platform=darwin --arch=x64 --electron-version=1.7.9
Created package never includes "@turf" and "@mapbox".
And also, it's depending modules are also not included.
My package.json includes "@turf", so it is not setting error.
{
"name": "MaplatEditor",
"version": "1.0.0",
"description": "",
"main": "lib/main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@turf/turf": "^4.6.1",
"argv": "0.0.2",
"async": "^2.5.0",
"child_process": "^1.0.2",
"electron-json-storage": "^3.2.0",
"file-url": "^2.0.2",
"fs-extra": "^3.0.1",
"imagemagick": "^0.1.3",
"mapshaper": "^0.4.31",
"path": "^0.12.7",
"wellknown": "^0.5.0"
}
}
How can I package such @-started modules into application package?
In my case, I updated @Turf module for latest version, then electron-packager worked well. I don't know why, but it looks not the issue of electron-packager...