Error when running npx @slicemachine/init

I get the following error:

npm ERR! syscall rename
npm ERR! path /Users/kris/Documents/code/honeynjam/website/node_modules/content-type
npm ERR! dest /Users/kris/Documents/code/honeynjam/website/node_modules/.content-type-T0IjUCpM
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/kris/Documents/code/honeynjam/website/node_modules/content-type' -> '/Users/kris/Documents/code/honeynjam/website/node_modules/.content-type-T0IjUCpM'

I have a "content-type" package because of a dependency of another package, but don't think the suggestion from NPM to rename it works quite well (you shouldn't change things inside node_modules)

Hi @kris1, I'm not seeing the same error on my machine when running npx @slicemachine/init. I tested it with the nextjs-starter-prismic-minimal starter.

npx @slicemachine/init@latest --repository <my-test-repo> --starter nextjs-starter-prismic-minimal-ts

However, I came across a similar error recently and fixed it by using Node.js v20 rather than v21.

If that does not solve the issue, could you describe the exact steps you take to get that error? Once I can see it on my side, we can try to find a fix or workaround. Thanks! :slightly_smiling_face:

@angeloashmore I don't think this error will be present in the " nextjs-starter-prismic-minimal" because you don't have a package called "content-type" within package-lock.json

I removed the package that had a dependency of the "content-type" package and the slice machine installation worked

1 Like

Thanks Kris for your answer. I'll close the topic for now but feel free to reopen if you notice a similar issue in the future. On our side, we noted the issue but will not immediately work on a fix since you could find a workaround, and the team is pretty busy on other priority works.