framework7-cli
framework7-cli copied to clipboard
Latest update breaks generate-assets...
(node:69348) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'platforms' of undefined at generateAssets (/usr/local/lib/node_modules/framework7-cli/generate-assets/index.js:39:19) at Command.program.command.option.option.description.action (/usr/local/lib/node_modules/framework7-cli/index.js:90:13) at process._tickCallback (internal/process/next_tick.js:68:7) (node:69348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:69348) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Why do you force the update when running the cli...? Is there anyway of making that optional, like just alerting if an update is available, like npm...
it seems like the problem is that it's expecting the platforms to be inside framework7 -> cordova in package.json . But after I changed my package.json I get another error which seems to be because generateAssets is called with an empty options object.
✖ Error generating assets Error: Input file is missing
After changing package.json framework7 generate-assets --ui works
add this to your package.json under framewok7:
"cordova": {
"platforms": [
"android"
],
"folder": "cordova"
}
also make sure the cwd property points to the correct path. the android icon name also changed to assets-src/cordova-android-icon.png
I'm having the same issue, even with the proper package.json, when I click generate assets in the ui it just stops the server and /generate errors out.
Same error as @bleecv here, any solution?
Same problem as @bleecv and @Adrian-GP
I find i way to make it run, in my package.json the cwd file was with the wrong path. After fixing it, i run the command again, give some DeprecationWarning than started to show a message with Generating assets (Please wait, it can take a while), and it stays like this for an hour! The process manager show that it is running, sometimes the node.js and java gives some spikes on CPU, but any file was modified in res folder.. So i believe that it's just not working.. i generated the assets manually
Any solution?
Any solution?
I generated my assets in another project, then pasted the folders in my main project I think, that's what I recall, but I didn't find a solution back then, that's for sure.
Check the path for cwd
in framework7.json. I changed the project location manually but forgot to update path in this file.
@Djekswon got it right (nice timing by the way), I had the same issue after I've moved my project folder.
Check the path for
cwd
in framework7.json. I changed the project location manually but forgot to update path in this file.
Yeah, just make cwd relative like "./"