SAP-archive / sap-devtoberfest-2020

The home of Devtoberfest 2020 - an open celebration of what makes us developers – coding and collaboration!
Apache License 2.0
180 stars 86 forks source link

CAP Ex-5 #46

Closed jkiran15 closed 4 years ago

jkiran15 commented 4 years ago

Hi, While trying to do the exercise -5 i am facing issue with command : npm install giving the below error after run the npm install command. Please check and help.

user: bookshop $ npm install npm ERR! code ETARGET npm ERR! notarget No matching version found for sqlite@^4.1.1. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist. npm ERR! notarget npm ERR! notarget It was specified as a dependency of 'bookshop' npm ERR! notarget

npm ERR! A complete log of this run can be found in: npm ERR! /home/user/.npm/_logs/2020-09-10T12_48_57_458Z-debug.log user: bookshop $

image

maxstreifeneder commented 4 years ago

hi @jkiran15,

seems like you have installed the wrong package. Could you please try to install the following package?

npm install sqlite3 -D

and uinstall the wrong package using:

npm uninstall sqlite

Cheers, Max

jkiran15 commented 4 years ago

Thank you Max for reply. I tried with first with npm install sqlite2 -D i got successful message . image

and then tried with uninstall command and got the same error as earlier npm uninstall sqlite image

not sure am i the only one getting this error. thank you for all your help. Max.

maxstreifeneder commented 4 years ago

can you please quickly paste your package.json content located the root directory (.../bookshop)?

jkiran15 commented 4 years ago

please find below: { "name": "bookshop", "version": "1.0.0", "description": "A simple CAP project.", "repository": "", "license": "UNLICENSED", "private": true, "dependencies": { "@sap/cds": "^4", "cds": "^0.2.0", "common": "^0.2.5", "express": "^4", "sap": "0.0.2", "sqlite": "^4.1.1" }, "devDependencies": { "sqlite3": "^4.2.0" }, "scripts": { "start": "npx cds run" }, "cds": { "requires": { "db": { "kind": "sqlite", "credentials": { "database": "bookshop.db" } } } } }

jkiran15 commented 4 years ago

Thank you . Max! After changing in package.json file from "sqlite" : "^4.1.1" to "sqlite3": "^4.2.0" I could able to run command : npm install then it was successful. image