directus-template-cli icon indicating copy to clipboard operation
directus-template-cli copied to clipboard

Dependencies fail to install for CMS template

Open xumix opened this issue 1 year ago • 5 comments

Literally this:

PS D:\Documents\Projects\directus> npx directus-template-cli@latest init
(\   /)
 \\_//
 ( Õ Õ) "Let's create a new Directus project!"
C(")(")
┌  Directus Template CLI - Create Project
│
◇  Enter the directory to create the project in:
│  ./my-directus-project
│
◇  Which Directus backend template would you like to use?
│  CMS
│
◇  Which frontend framework do you want to use?
│  Svelte
│
◇  Would you like to install project dependencies automatically?
│  Yes
│
◇  Initialize a new Git repository?
│  Yes
│
◇  Docker containers running!
│
◇  Directus is ready!
Applying template from: my-directus-project/directus/template
-- Logged in as Admin User
Loading 24 collections and 276 fields... done
Loading 66 relations... done
Loading 4 roles... done
Loading 7 policies... done
Loading 149 permissions... done
Loading 3 users... done
Loading 12 accesses... done
Loading 4 folders... done
Loading 32 files... done
Loading data for 24 collections... done
Updating 31 fields to required... done
Loading 1 dashboards... done
Loading 9 flows... done
Loading settings... done
Loading 1 translations... done
Loading 11 presets... done
Found 17 extensions total: 12 registry extensions (including 2 bundles), and 0 local extensions
-- Installed @directus-labs/ai-image-generation-operation
-- Installed @directus-labs/experimental-m2a-interface
-- Installed @directus-labs/super-header-interface
-- Installed @directus-labs/inline-repeater-interface
-- Installed @directus-labs/seo-plugin
-- Installed directus-extension-wpslug-interface
-- Installed @directus-labs/ai-writer-operation
-- Installed @directus-labs/liquidjs-operation
-- Installed @directus-labs/card-select-interfaces
-- Installed @directus-labs/simple-list-interface
-- Installed @directus-labs/command-palette-module
-- Installed directus-extension-group-tabs-interface
Installing 12 extensions... done
Finished installing extensions
------------------
Template applied successfully.
│
◑  Installing dependencies »   Warning: Failed to install dependencies
No chunk id map found
 »   Error: Error: `corepack pnpm install` failed.
 »
 »   C:\Program Files\nodejs\node_modules\corepack\dist\lib\corepack.cjs:21535
 »     if (key == null || signature == null) throw new Error(`Cannot find matching keyid: ${JSON.stringify({
 »   signatures, keys })}`);
 »                                                 ^
 »
 »   Error: Cannot find matching keyid: {"signatures":[{"sig":"MEQCIE8sOPW5tAvxCYNlsPeAFWsv9nz3/TUYlQj4HM43MkjpAiA1X5oi
 »   Rf6zoZBo5Z0RIF4kvZvbrMBJgp9ykHe/0Z+efA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"keys":[{
 »   "expires":null,"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","schem
 »   e":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5
 »   UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="}]}
 »       at verifySignature (C:\Program Files\nodejs\node_modules\corepack\dist\lib\corepack.cjs:21535:47)
 »       at fetchLatestStableVersion (C:\Program Files\nodejs\node_modules\corepack\dist\lib\corepack.cjs:21553:5)
 »       at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
 »       at async fetchLatestStableVersion2 (C:\Program
 »   Files\nodejs\node_modules\corepack\dist\lib\corepack.cjs:21672:14)
 »       at async Engine.getDefaultVersion (C:\Program
 »   Files\nodejs\node_modules\corepack\dist\lib\corepack.cjs:22292:23)
 »       at async Engine.executePackageManagerRequest (C:\Program
 »   Files\nodejs\node_modules\corepack\dist\lib\corepack.cjs:22390:47)
 »       at async Object.runMain (C:\Program Files\nodejs\node_modules\corepack\dist\lib\corepack.cjs:23096:5)
 »
 »   Node.js v22.11.0
 »
 »   Context: {"dir":"./my-directus-project","flags":{"frontend":"svelte","gitInit":true,"installDeps":true,"template":
 »   "cms","overwriteDir":false},"function":"init"}
▲  Something went wrong

xumix avatar Jul 21 '25 15:07 xumix

Try updating to a newer version of NodeJS.

kheiner avatar Oct 07 '25 01:10 kheiner

Try updating to a newer version of NodeJS.

Ironically, it does not help https://github.com/directus-labs/directus-template-cli/issues/95#issuecomment-3299368584

xumix avatar Oct 07 '25 07:10 xumix

Is this still an issue?

bryantgillespie avatar May 13 '26 20:05 bryantgillespie

Is this still an issue?

Yes and no :/

Installing 11 extensions... done
Finished installing extensions
------------------
Template applied successfully.
│
 ›   Warning: Failed to install dependencies
 ›   Error: Error: spawn pnpm ENOENT
 ›   Context:
 ›   {"dir":"./my-directus-project","flags":{"frontend":"nextjs","gitInit":true,"installDeps":true,"overwriteDir":false,"template":"cms"},"function":"init"}
▲  Something went wrong

An with installed pnpm:

◒  Installing dependencies.. ›   Warning: Failed to install dependencies
 ›   Error: Error: `pnpm install` failed.
 ›   Progress: resolved 1, reused 0, downloaded 0, added 0
 ›   Progress: resolved 53, reused 0, downloaded 43, added 0
 ›   Progress: resolved 159, reused 0, downloaded 151, added 0
 ›   Progress: resolved 226, reused 0, downloaded 199, added 0
 ›   Progress: resolved 353, reused 0, downloaded 311, added 0
 ›   Progress: resolved 483, reused 0, downloaded 413, added 0
 ›   Progress: resolved 620, reused 0, downloaded 533, added 0
 ›   [WARN] 2 deprecated subdependencies found: [email protected], [email protected]
 ›   Packages: +622
 ›   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 ›   Progress: resolved 689, reused 0, downloaded 627, added 0
 ›   Progress: resolved 689, reused 0, downloaded 627, added 515
 ›   Progress: resolved 689, reused 0, downloaded 627, added 622, done
 ›
 ›   dependencies:
 ›   + @directus/sdk 20.0.3 (21.3.0 is available)
 ›   + @directus/visual-editing 2.0.0 (2.0.1 is available)
 ›   + @hookform/resolvers 5.0.1 (5.2.2 is available)
 ›   + @radix-ui/react-checkbox 1.1.4 (1.3.3 is available)
 ›   + @radix-ui/react-collapsible 1.1.3 (1.1.12 is available)
 ›   + @radix-ui/react-dialog 1.1.6 (1.1.15 is available)
 ›   + @radix-ui/react-dropdown-menu 2.1.6 (2.1.16 is available)
 ›   + @radix-ui/react-label 2.1.2 (2.1.8 is available)
 ›   + @radix-ui/react-navigation-menu 1.2.5 (1.2.14 is available)
 ›   + @radix-ui/react-radio-group 1.2.3 (1.3.8 is available)
 ›   + @radix-ui/react-select 2.1.6 (2.2.6 is available)
 ›   + @radix-ui/react-separator 1.1.2 (1.1.8 is available)
 ›   + @radix-ui/react-slot 1.1.2 (1.2.4 is available)
 ›   + @radix-ui/react-tooltip 1.1.8 (1.2.8 is available)
 ›   + @tailwindcss/typography 0.5.16 (0.5.19 is available)
 ›   + @types/react 19.1.0 (19.2.14 is available)
 ›   + @types/react-dom 19.1.1 (19.2.3 is available)
 ›   + class-variance-authority 0.7.1
 ›   + clsx 2.1.1
 ›   + cmdk 1.1.1
 ›   + dotenv 16.4.7 (17.4.2 is available)
 ›   + lucide-react 0.487.0 (1.14.0 is available)
 ›   + next 15.2.8 (16.2.6 is available)
 ›   + next-themes 0.4.6
 ›   + p-queue 8.1.0 (9.2.0 is available)
 ›   + react 19.2.3 (19.2.6 is available)
 ›   + react-dom 19.2.3 (19.2.6 is available)
 ›   + react-hook-form 7.55.0 (7.75.0 is available)
 ›   + shadcn 2.4.0 (4.7.0 is available)
 ›   + tailwind-merge 2.6.0 (3.6.0 is available)
 ›   + zod 3.24.2 (4.4.3 is available)
 ›
 ›   devDependencies:
 ›   + @eslint/js 9.24.0 (10.0.1 is available)
 ›   + @next/bundle-analyzer 15.2.8 (16.2.6 is available)
 ›   + @next/eslint-plugin-next 15.2.8 (16.2.6 is available)
 ›   + @trivago/prettier-plugin-sort-imports 5.2.2 (6.0.2 is available)
 ›   + @types/node 22.14.0 (25.7.0 is available)
 ›   + @types/readline-sync 1.4.8
 ›   + directus-sdk-typegen 0.2.0 (0.2.1 is available)
 ›   + eslint 9.24.0 (10.3.0 is available)
 ›   + eslint-config-next 15.2.8 (16.2.6 is available)
 ›   + eslint-config-prettier 10.1.1 (10.1.8 is available)
 ›   + eslint-plugin-import 2.31.0 (2.32.0 is available)
 ›   + eslint-plugin-promise 7.2.1 (7.3.0 is available)
 ›   + eslint-plugin-react 7.37.5
 ›   + eslint-plugin-tailwindcss 3.18.0 (3.18.3 is available)
 ›   + globals 16.0.0 (17.6.0 is available)
 ›   + postcss 8.5.3 (8.5.14 is available)
 ›   + prettier 3.5.3 (3.8.3 is available)
 ›   + prettier-plugin-tailwindcss 0.6.11 (0.8.0 is available)
 ›   + readline-sync 1.4.10
 ›   + tailwindcss 3.4.17 (4.3.0 is available)
 ›   + tailwindcss-animate 1.0.7
 ›   + tsx 4.19.3 (4.21.1 is available)
 ›   + typescript 5.8.3 (6.0.3 is available)
 ›   + typescript-eslint 8.29.1 (8.59.3 is available)
 ›
 ›   [ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: [email protected], [email protected], [email protected]
 ›
 ›   Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts.
 ›
 ›
 ›   Context:
 ›   {"dir":"./my-directus-project","flags":{"frontend":"nextjs","gitInit":true,"installDeps":true,"overwriteDir":false,"template":"cms"},"function":"init"}
▲  Something went wrong

xumix avatar May 14 '26 11:05 xumix

Still a corepack issue then

bryantgillespie avatar May 14 '26 11:05 bryantgillespie