Welcome to the Linux Foundation Forum!

Lab 5.1 npm fastify -- --integrate doesn't work with npm 8

Hi everyone,

I'm doing all the course lessons and labs with Node 12 as the Section Setting Up indicates. But, since right now the exam environment of JSNSD Certification is currently running Node Version 16 LTS, I decided to repeat all the lessons and labs in that version.

I'm trying to create the fastify project for the Lab 5.1 using the npm fastify -- --integrate and it doesn't work. The output says that in the folder already exists a package.json file.

I search in the forum and noticed that this situation already happened before, when someone tried to do this with npm 7. At that time the command was npm fastify --integrate (worked on npm 6, not in npm 7) and after the solution was found, @davidmarkclements updated the content to npm fastify -- --integrate.

Right now, the Node 16 installation come with npm 8 and the problem is happening again. I found a solution in npm fastify-cli documentation (https://www.npmjs.com/package/fastify-cli) not using the npm command but directly the fastify command, like this: fastify generate . --integrate

I post this solution for everyone else that has the same problem but, already exists a way to do this with npm 8? or is necessary create a new issue as David did at that time?

Hope to be hepful.

Best regards.

Comments

Categories

Upcoming Training