Welcome to the Linux Foundation Forum!

Lab 5.1 - Fastify --integrate flag


I am trying to create a fastify project for Lab 5.1 using the --integrate flag, full cmd line "npm init fastify --integrate".

As I understand the flag overwrites the existing package.json but I keep getting an error "a package.json file already exists in target directory".

Am I missing something? I have not installed fastify-cli globally, Do I need to?

Thanks in advance

Best Answer


  • @hpcergar , thanks for replying.

    I checked again after your comment but no luck. I then downgraded my npm version to the latest 6 (v6.14.11) as I was using npm 7.6.0 (latest) and the command works now, also using latest node 14 (v14.16.0). Maybe it's a problem with the npm version? not sure but it works now.

    Thanks again for confirming that it was working for you.

  • davedass12davedass12 Posts: 1

    @hpcergar said:
    Hi there,

    I didn't need to install fastify globally to make this work. Normally using the command you mention would do the trick.

    Checked the main repo for you issue but didn't seem to have anything related: https://github.com/fastify/create-fastify

    this github thread was helpful

Sign In or Register to comment.