Unable to use a custom theme package

I am following the guide here:

I have created my theme package and I have modified my frontity.settings.js file to use the new theme package. Running npx frontity dev fails with an error that the theme is not installed though:

➜  hello-frontity git:(master) βœ— npx frontity create-package my-theme
? Enter the namespace of the package: theme
βœ” Adding package.json.
βœ” Adding src/index.js.
βœ” Installing package my-theme.

New package "my-theme" created.

➜  hello-frontity git:(master) βœ— npx frontity dev

Error: The package "@frontity/my-theme" doesn't seem to be installed. Make sure you did "npm install @frontity/my-theme"

If you need help please visit https://community.frontity.org

Am I missing a step? I see the theme package folder on my directory though. Thanks for taking a look!

Here’s my frontity.settings.js file:

const settings = {
  "name": "hello-frontity",
  "state": {
    "frontity": {
      "url": "https://test.frontity.org",
      "title": "Test Frontity Blog",
      "description": "WordPress installation for Frontity development"
    }
  },
  "packages": [
    {
      "name": "@frontity/my-theme",
    },
    {
      "name": "@frontity/wp-source",
      "state": {
        "source": {
          "url": "https://test.frontity.org"
        }
      }
    },
    "@frontity/tiny-router",
    "@frontity/html2react"
  ]
};

export default settings;

I think you have to make sure that it’s part of the package.json by doing: npms install path-to-file

Hi @arun

here you should not use @frontity/my-theme, instead, you should use

packages": [
    {
      "name": "my-theme",
    },
2 Likes

@santoshdevnath15 Doh, thanks for pointing that out! I will give it a try later today.