[Solved] Can't install Kitchen Sink

Just got started with framework7, but I can’t install kitchen sink.

I am getting this error:

$ npm run core:prod

npm ERR! Linux 4.15.0-46-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "core:prod"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2

npm ERR! missing script: core:prod
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /media/twilight/Worker/GitHub/nodejs/framework7/npm-debug.log

And the log mentioned in the previous line:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'core:prod' ]
2 info using [email protected]
3 info using [email protected]
4 verbose stack Error: missing script: core:prod
4 verbose stack     at run (/usr/share/npm/lib/run-script.js:147:19)
4 verbose stack     at /usr/share/npm/lib/run-script.js:57:5
4 verbose stack     at /usr/share/npm/node_modules/read-package-json/read-json.js:345:5
4 verbose stack     at checkBinReferences_ (/usr/share/npm/node_modules/read-package-json/read-json.js:309:45)
4 verbose stack     at final (/usr/share/npm/node_modules/read-package-json/read-json.js:343:3)
4 verbose stack     at then (/usr/share/npm/node_modules/read-package-json/read-json.js:113:5)
4 verbose stack     at /usr/share/npm/node_modules/read-package-json/read-json.js:232:12
4 verbose stack     at /usr/share/npm/node_modules/graceful-fs/graceful-fs.js:76:16
4 verbose stack     at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
5 verbose cwd /media/twilight/Worker/GitHub/nodejs/framework7
6 error Linux 4.15.0-46-generic
7 error argv "/usr/bin/node" "/usr/bin/npm" "run" "core:prod"
8 error node v8.10.0
9 error npm  v3.5.2
10 error missing script: core:prod
11 error If you need help, you may report this error at:
11 error     <https://github.com/npm/npm/issues>
12 verbose exit [ 1, true ]

And yes, I installed gulp through my distribution’s package manager (Ubuntu 18.04).

Do I really need Kitchen Sink in order to start developing?

hi, you dont need Kitchen Sink to develope.

make sure you are in the dir where package.json is, before runing the script.

I am absolutely certain I am at the necessary directory when working and done everything according to the instructions.

share package.json
but its odd that the script is missing

and the steps you did to install F7 + the dir path

Ok.

pwd

/media/twilight/Worker/GitHub/nodejs/framework7

cat ./package.json

{
  "name": "framework7",
  "version": "4.2.0",
  "description": "Full featured mobile HTML framework for building iOS & Android apps",
  "main": "js/framework7.js",
  "typings": "js/framework7.d.ts",
  "jsnext:main": "framework7.esm.js",
  "module": "framework7.esm.js",
  "scripts": {
    "postinstall": "node -e \"console.log('\\u001b[35m\\u001b[1mLove Framework7? Support project by donating or pledging on patreon:\\u001b[22m\\u001b[39m\\n > \\u001b[32mhttps://patreon.com/vladimirkharlampidi\\u001b[0m\\n')\""
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/framework7io/framework7.git"
  },
  "keywords": [
    "mobile",
    "framework",
    "framework7",
    "cordova",
    "ios",
    "iphone",
    "ipad",
    "apple",
    "phonegap",
    "native",
    "touch",
    "appstore",
    "app",
    "f7",
    "material",
    "android",
    "google",
    "googleplay"
  ],
  "author": "Vladimir Kharlampidi",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/framework7io/framework7/issues"
  },
  "homepage": "http://framework7.io/",
  "dependencies": {
    "dom7": "^2.1.3",
    "path-to-regexp": "^3.0.0",
    "ssr-window": "^1.0.1",
    "template7": "^1.4.1"
   }
 }

Prior to the above I did the following:

$ sudo apt-get install npm gulp

Then I unzipped F7 from releases:

https://github.com/framework7io/framework7/releases/download/v4.2.0/framework7.tar.gz

Then did this in the working directory, to obtain css & js:

$ npm install framework7

The rest as I mentioned in the first post.

you are missing all the scripts

  "scripts": {
    "build:dev": "cross-env-shell NODE_ENV=development \"gulp build-core && gulp phenome && gulp build-vue && gulp build-react\"",
    "build:prod": "cross-env-shell NODE_ENV=production \"gulp build-core && gulp phenome && gulp build-vue && gulp build-react\"",
    "build-core-icons-font": "python ./scripts/icon-font/generate.py",
    "build-skeleton-font": "python ./scripts/skeleton-font/generate.py",
    "build-core:dev": "cross-env NODE_ENV=development gulp build-core",
    "build-core:prod": "cross-env NODE_ENV=production gulp build-core",
    "build-vue:dev": "cross-env-shell NODE_ENV=development \"gulp phenome && gulp build-vue\"",
    "build-vue:prod": "cross-env-shell NODE_ENV=production \"gulp phenome && gulp build-vue\"",
    "build-react:dev": "cross-env-shell NODE_ENV=development \"gulp phenome && gulp build-react\"",
    "build-react:prod": "cross-env-shell NODE_ENV=production \"gulp phenome && gulp build-react\"",
    "dev": "cross-env-shell NODE_ENV=development \"gulp build-core && gulp phenome && gulp build-vue && gulp build-react && gulp ks-core && gulp ks-react && gulp ks-vue && gulp server\"",
    "prod": "cross-env-shell NODE_ENV=production \"gulp ks-core && gulp ks-react && gulp ks-vue && gulp server\"",
    "ks:dev": "cross-env-shell NODE_ENV=development \"gulp ks-core && gulp ks-react && gulp ks-vue\"",
    "ks:prod": "cross-env-shell NODE_ENV=production \"gulp ks-core && gulp ks-react && gulp ks-vue\"",
    "core:dev": "cross-env-shell NODE_ENV=development \"gulp build-core && gulp ks-core && gulp server-core\"",
    "core:prod": "cross-env-shell NODE_ENV=production \"gulp ks-core && gulp server-core\"",
    "react:dev": "cross-env-shell NODE_ENV=development \"gulp build-core && gulp phenome && gulp build-react && gulp ks-react && gulp server-react\"",
    "react:prod": "cross-env-shell NODE_ENV=production \"gulp ks-react && gulp server-react\"",
    "vue:dev": "cross-env-shell NODE_ENV=development \"gulp build-core && gulp phenome && gulp build-vue && gulp ks-vue && gulp server-vue\"",
    "vue:prod": "cross-env-shell NODE_ENV=production \"gulp ks-vue && gulp server-vue\"",
    "lint": "eslint .",
    "lint:fix": "eslint . --fix",
    "test": "npm run build:dev && eslint .",
    "release": "bash ./scripts/release.sh",
    "release-update-dependencies": "node ./scripts/release-update-dependencies.js",
    "postinstall": "node -e \"console.log('\\u001b[35m\\u001b[1mLove Framework7? Support project by donating or pledging on patreon:\\u001b[22m\\u001b[39m\\n > \\u001b[32mhttps://patreon.com/vladimirkharlampidi\\u001b[0m\\n')\""
  },

try by removeing framework7 dir, and git clone again
or download the sourcecode
https://github.com/framework7io/framework7/archive/v4.2.0.tar.gz

Thank you. So I had to clone instead of downloading the “release”?
I now have the kitchen sink directory, but I am getting new errors instead:

npm ERR! Linux 4.15.0-46-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "core:prod"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] core:prod: `cross-env-shell NODE_ENV=production "gulp ks-core && gulp server-core"`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] core:prod script 'cross-env-shell NODE_ENV=production "gulp ks-core && gulp server-core"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the framework7-source package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env-shell NODE_ENV=production "gulp ks-core && gulp server-core"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs framework7-source
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls framework7-source
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /media/twilight/Worker/GitHub/nodejs/framework7/npm-debug.log

Did you install the dependence? npm install

Sorry my bad, I typed npm install framework7 in the working directory instead of plain npm install.

It works now, thank you very much. Should I change the topic title into “Solved”?

EDIT: Marked as solved.

1 Like

No puedo instalar el Kitchen_sink

Podrías poner un poco más de información. Te da algún error? Que error?

PS C:\Users\laine\Desktop\Movil> npm run core:prod
npm ERR! missing script: core:prod

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\laine\AppData\Roaming\npm-cache_logs\2019-12-07T19_26_05_243Z-debug.log

Este es el error que estoy obteniendo…!

Siguiendo los pasos de la documentación…

Ok. Ese error es porque no encuentra el comando core:prod

Podrías compartir el árbol de archivos de la carpeta? O sino borrar todo. Hacer un nuevo git clone e intentar nuevamente.

Ves el archivo package.json en esa carpeta? Podrías compartir su contenido?

Ya encontré el error, estaba en que los comandos no los estaba corriendo en el directorio adecuado. De igual forma muchas gracias…

Pero tengo una consulta, para iniciar un proyecto con Framework7, no necesito utilizar el comando npm init --yess

No. F7 cli se ocupa de todo

¿A qué se refiere con todo? ¿Cuál es la forma correcta de crear un proyecto para usar F7?

deberias usar f7 cli
https://framework7.io/cli/
crea todo el proyecto, lee la documentacion del CLI, esta todo explicado ahi.

1 Like

Tengo problemas con el comando Framework7 create., me muestra el siguiente error.

framework7 : No se puede cargar el archivo C:\Users[Usuario]\AppData\Roaming\npm\framework7.ps1 porque la ejecución de scripts está
deshabilitada en este sistema. Para obtener más información, consulta el tema
about_Execution_Policies en https:/go.microsoft.com/fwlink/?LinkID=135170.
En línea: 1 Carácter: 1

  • framework7 create --ui
  •   + CategoryInfo          : SecurityError: (:) [], PSSecurityException
      + FullyQualifiedErrorId : UnauthorizedAccess