Today to installed an update to Framework7 CLI and now I am not able to create a new project. Below is the error that I get:
× Error executing NPM Scripts
Cannot copy `'./node_modules/framework7-icons/fonts/*.*'`: the file doesn't exist
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `cpy './node_modules/framework7-icons/fonts/*.*' './src/fonts/'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Ref HandMan\AppData\Roaming\npm-cache\_logs\2019-12-06T14_49_17_555Z-debug.log
Here are the options that I used:
D:\PhoneGap\test6>framework7 create
√ All good, you have latest framework7-cli version.
? What type of the app are you targeting? Cordova app (targets native iOS and An
droid apps, or native desktop app with Electron)
? App (project) name: Test6
? App package (Bundle ID): io.framework.test6
? Target Cordova platform: Android, Electron (native desktop app)
? What type of framework do you prefer? Framework7 Core
? Choose starter template: Single View
? Should we setup project with bundler? Webpack (recommended)
? Do you want to setup CSS Pre-Processor No, i am good with CSS
? Do you want to specify custom theme color? No, use default color theme
? Do you want to include Framework7 Icons and Material Icons icon fonts? Yes, in
clude icon fonts
Additional Information:
Running Windows 10 Pro
Node v12.13.0
npm 6.12.1
framework7-cli 3.0.6
I reinstalled node, npm, cordova, and f7 cli and still get the error.
Confirmed that “./node_modules/framework7-icons/fonts” exists under the project folder and has files in it.
Ok, I was able to work around this issue by saying “No” to question include Framework7 Icons. Now, however, this isn’t a good work around because the apps don’t render correctly since I need to use them.
Looks like it can’t execute command cpy './node_modules/framework7-icons/fonts/*.*' './src/fonts/' to copy f7 icons fonts to your project folder. This can be because of some permissions issues on your system/folders. You can just copy it manually then
@nolimits4web I didn’t have this issue until I got the update the other day. Also, I ran this under the Command Prompt run as Administrator and confirmed that my user has full rights to the folder.
I was able to locate the offending line in the file generate-package-json.js on line 110. I made the change locally on my machine and it fixed the issue. I recommend that you make a similar change to the master branch in a future update.