Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'sql.js' #37

Open
sugandhgoyal opened this issue Aug 25, 2017 · 3 comments
Open

Cannot find module 'sql.js' #37

sugandhgoyal opened this issue Aug 25, 2017 · 3 comments

Comments

@sugandhgoyal
Copy link

Whenever I run npm run server it gives me this error. I have googled it a lot but haven't found the solution. what should i do?
module.js:487
throw err;
^

Error: Cannot find module 'sql.js'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object. (C:/Users/ATUL/Documents/GitHub/food-lookup-demo/server.js:3:16)
at Module._compile (module.js:569:30)
at loader (C:\Users\ATUL\Documents\GitHub\food-lookup-demo\node_modules\babel-register\lib\node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (C:\Users\ATUL\Documents\GitHub\food-lookup-demo\node_modules\babel-register\lib\node.js:154:7)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] server: babel-node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] server 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\ATUL\AppData\Roaming\npm-cache_logs\2017-08-25T18_50_06_252Z-debug.lo

@acco
Copy link
Member

acco commented Aug 30, 2017

Hi @sugandhgoyal

I just tested it from scratch and it's working for me. Did you npm i in both the top-level directory and inside client/?

Lmk

@TiE23
Copy link

TiE23 commented Mar 14, 2018

Since I figure someone Googling the same exact error as me will show up here - in the Fullstack React book teaching how to write your own GraphQL server it's never said to add sql to your dependencies. So if you're having this issue trying to run sqlite3 on the seedData.js example file just run npm i [email protected] --save --save-exact and that should solve things for you.

@mazer-rakham
Copy link

This needs to be more easily accessible. I was tearing my head out for an hour trying to write sqlite functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants