Coder Social home page Coder Social logo

Comments (9)

samsom avatar samsom commented on May 28, 2024

in another terminal:

[email protected] start C:\code\fastify\fastify-example-twitter
fastify index.js "--log-level" "trace" "--port" "3001"

AsyncFunction
assert.js:212
assert.ifError = function ifError(err) { if (err) throw err; };
^

Error: ENOENT: no such file or directory, stat 'C:\code\fastify\fastify-example-
twitter\frontend\build'
at fs.statSync (fs.js:968:11)
at checkPath (C:\code\fastify\fastify-example-twitter\node_modules\fastify-s
tatic\index.js:91:16)
at checkPathsForErrors (C:\code\fastify\fastify-example-twitter\node_modules
\fastify-static\index.js:76:13)
at fastifyStatic (C:\code\fastify\fastify-example-twitter\node_modules\fasti
fy-static\index.js:15:17)
at Plugin.exec (C:\code\fastify\fastify-example-twitter\node_modules\avvio\p
lugin.js:33:17)
at Boot.loadPlugin (C:\code\fastify\fastify-example-twitter\node_modules\avv
io\plugin.js:114:10)
at Task.release (C:\code\fastify\fastify-example-twitter\node_modules\fastq
queue.js:127:16)
at worked (C:\code\fastify\fastify-example-twitter\node_modules\fastq\queue.
js:169:10)
at toLoad.finish (C:\code\fastify\fastify-example-twitter\node_modules\avvio
\plugin.js:117:7)
at done (C:\code\fastify\fastify-example-twitter\node_modules\avvio\plugin.j
s:74:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: fastify index.js "--log-level" "trace" "--port" "3 001"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\samsom\AppData\Roaming\npm-cache_logs\2018-01-06T05_40_47
_161Z-debug.log

from fastify-example-twitter.

allevo avatar allevo commented on May 28, 2024

Hi!
thanks for trying this example!!

which nodejs and npm version are you using?

Could you try to use node8 with npm5?

from fastify-example-twitter.

samsom avatar samsom commented on May 28, 2024

i use nodejs9. I will try node8. thanks u for your feedback.

from fastify-example-twitter.

allevo avatar allevo commented on May 28, 2024

@samsom The readme was wrong. I've created a PR to update it and I have already merged it into master

Try npm run build as the output suggests

from fastify-example-twitter.

samsom avatar samsom commented on May 28, 2024

Thanks a lot!

from fastify-example-twitter.

samsom avatar samsom commented on May 28, 2024

@allevo I love fastify and its style, I want to use it to develop my project. but I am newbie ,the best way
for the fastify' Fans like me is learning by example project . so please help us to improve Readme.md。 cause when I use nodej8 and npm5 to run the code ,still have following err:
~/fastjs/fastify-example-twitter$ npm start -- --log-level trace --port 3001

[email protected] start /home/test/fastjs/fastify-example-twitter
fastify index.js "--log-level" "trace" "--port" "3001"

AsyncFunction
(node:22202) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): MongoError: unknown option to collMod: validator
(node:22202) [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.
Server listening on http://localhost:3001
events.js:183
throw er; // Unhandled 'error' event
^

Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
at Object._errnoException (util.js:1022:11)
at _exceptionWithHostPort (util.js:1044:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: fastify index.js "--log-level" "trace" "--port" "3001"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start 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! /home/test/.npm/_logs/2018-01-07T03_47_54_996Z-debug.log

from fastify-example-twitter.

allevo avatar allevo commented on May 28, 2024

Hi!
this example works with mongodb and redis.
The error message shows that the redis library tries to connect to 127.0.0.1:6379 but at that port no redis server is listening.

So, a possible solution is to install mongodb and redis database on you local machine. Another solution (better) is to set up docker on your local machine and use it to run mongodb and redis on localhost.

docker run --rm -d -p 6379:6379 redis
docker run --rm -d -p 27017:27017 mongo

Anyway thank you for trying this example. If the README is not clear is a problem/bug. So any problem is welcomed! I'll update the README asap

from fastify-example-twitter.

samsom avatar samsom commented on May 28, 2024

work. thanks allevo . I will write done my whole story about how to run this example tomorrow .

from fastify-example-twitter.

allevo avatar allevo commented on May 28, 2024

Thank you a lot!

I'm happy the example works well on your machine too!!!

I'll update the README asap

If you are in trouble please open another issue!

from fastify-example-twitter.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.