# Create new theme not working

**URL:** https://community.prismic.io/t/create-new-theme-not-working/7904
**Category:** Developing with Prismic
**Created:** [November 16, 2021, 3:24pm UTC](https://community.prismic.io/t/create-new-theme-not-working/7904 "2021-11-16T15:24:03Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![louis-marie.desurema](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@louis-marie.desurema](https://community.prismic.io/u/louis-marie.desurema)
#### Post date: [November 16, 2021, 3:24pm UTC](https://community.prismic.io/t/create-new-theme-not-working/7904/1 "2021-11-16T15:24:03Z")

</div>

Hello,

I'm trying to create a prismic theme with some custom types inside but I'm getting an error when running the command. This is what I have done so far:

- created a public repo on github to hold the theme files
- added a custom\_types folder and added a json file for each custom type
- added a prismic-configuration.json at the root of the repo
- installed prismic cli: prismic-cli/4.2.0 linux-x64 node-v10.19.0
- run the create theme command: prismic theme --theme-url [https://github.com/mygithubid/prismic-theme](https://github.com/mygithubid/prismic-theme) --conf prismic-configuration.json

I'm getting the following error :  
SyntaxError: Invalid or unexpected token

Also, I've read somewhere there is a possibility of using a zip file instead of a git repo and that would be fine for us but I didn't find documentation on how to do it this way.

Thanks for any help

---

<div class="post-metadata">

### Author: ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)
#### Post date: [November 17, 2021, 2:23am UTC](https://community.prismic.io/t/create-new-theme-not-working/7904/2 "2021-11-17T02:23:01Z")

</div>

Hey, @louis-marie.desurema welcome to the forum, and thanks for reaching out!  
This is happening because the theme command only works with public GitHub repositories.

Your setup looks correct. As soon as you make the repo public, it should work just fine 👌

---

<div class="post-metadata">

### Author: ![louis-marie.desurema](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@louis-marie.desurema](https://community.prismic.io/u/louis-marie.desurema)
#### Post date: [November 17, 2021, 7:59am UTC](https://community.prismic.io/t/create-new-theme-not-working/7904/4 "2021-11-17T07:59:49Z")

</div>

Hi Pau and thank you for the prompt reply!

The repo is already public, I created it especially to make the prismic theme work, however I'm getting this error. Any other idea ?

---

<div class="post-metadata">

### Author: ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)
#### Post date: [November 17, 2021, 10:15pm UTC](https://community.prismic.io/t/create-new-theme-not-working/7904/5 "2021-11-17T22:15:40Z")

</div>

Maybe you need to double-check that you are using the correct URL of your GitHub repository. If I open this one: [https://github.com/mygithubid/prismic-theme](https://github.com/mygithubid/prismic-theme) it shows me a 'Page not found'.

This happens when you don't have the proper permissions on GitHub to access it.

---

<div class="post-metadata">

### Author: ![louis-marie.desurema](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@louis-marie.desurema](https://community.prismic.io/u/louis-marie.desurema)
#### Post date: [November 18, 2021, 7:57am UTC](https://community.prismic.io/t/create-new-theme-not-working/7904/6 "2021-11-18T07:57:41Z")

</div>

That's only because I have the habit of not posting account links on public forum; Now that I think about it, I'm not even sure why 😅

The real link to the repo is this one. I can confirm that in the repo settings the access is set public

> **[GitHub - marcodepolo/prismic-theme](https://github.com/marcodepolo/prismic-theme)**
>
> Contribute to marcodepolo/prismic-theme development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![louis-marie.desurema](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@louis-marie.desurema](https://community.prismic.io/u/louis-marie.desurema)
#### Post date: [November 18, 2021, 12:36pm UTC](https://community.prismic.io/t/create-new-theme-not-working/7904/7 "2021-11-18T12:36:02Z")

</div>

I tried to completely uninstall and reinstall npm from my computer and there is some progress, I am now able to login with prismic cli and the token error is gone !

however, I have a new error now when I run

`prismic theme --theme-url prismic-theme.zip --conf prismic-configuration.json`  
or  
`prismic theme --theme-url https://github.com/marcodepolo/prismic-theme --conf prismic-configuration.json`

```auto
node:events:368
      throw er; // Unhandled 'error' event
      ^

Error: ENOENT: no such file or directory, scandir '/home/linuxbrew/.linuxbrew/lib/node_modules/prismic-cli/node_modules/generator-prismic-angular2/lib/generators'
    at Object.readdirSync (node:fs:1390:3)
    at exports.readdir (/home/linuxbrew/.linuxbrew/lib/node_modules/prismic-cli/node_modules/@mrmlnc/readdir-enhanced/lib/sync/fs.js:18:20)
    at Object.safeCall [as safe] (/home/linuxbrew/.linuxbrew/lib/node_modules/prismic-cli/node_modules/@mrmlnc/readdir-enhanced/lib/call.js:24:8)
    at DirectoryReader.readNextDirectory (/home/linuxbrew/.linuxbrew/lib/node_modules/prismic-cli/node_modules/@mrmlnc/readdir-enhanced/lib/directory-reader.js:78:10)
    at Readable.DirectoryReader.stream._read (/home/linuxbrew/.linuxbrew/lib/node_modules/prismic-cli/node_modules/@mrmlnc/readdir-enhanced/lib/directory-reader.js:57:18)
    at Readable.read (node:internal/streams/readable:496:27)
    at readdirSync (/home/linuxbrew/.linuxbrew/lib/node_modules/prismic-cli/node_modules/@mrmlnc/readdir-enhanced/lib/sync/index.js:27:21)
    at Function.readdirSyncStat (/home/linuxbrew/.linuxbrew/lib/node_modules/prismic-cli/node_modules/@mrmlnc/readdir-enhanced/lib/index.js:34:10)
    at ReaderSync.dynamicApi (/home/linuxbrew/.linuxbrew/lib/node_modules/prismic-cli/node_modules/yeoman-environment/node_modules/fast-glob/out/providers/reader-sync.js:64:24)
    at ReaderSync.api (/home/linuxbrew/.linuxbrew/lib/node_modules/prismic-cli/node_modules/yeoman-environment/node_modules/fast-glob/out/providers/reader-sync.js:56:25)
Emitted 'error' event on Readable instance at:
    at emitErrorNT (node:internal/streams/destroy:164:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -2,
  syscall: 'scandir',
  code: 'ENOENT',
  path: '/home/linuxbrew/.linuxbrew/lib/node_modules/prismic-cli/node_modules/generator-prismic-angular2/lib/generators'
}

Node.js v17.0.1

```

---

<div class="post-metadata">

### Author: ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)
#### Post date: [November 18, 2021, 3:42pm UTC](https://community.prismic.io/t/create-new-theme-not-working/7904/8 "2021-11-18T15:42:25Z")

</div>

Which version of the CLI and node do you have?  
I just ran your command and it worked correctly.

---

<div class="post-metadata">

### Author: ![louis-marie.desurema](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@louis-marie.desurema](https://community.prismic.io/u/louis-marie.desurema)
#### Post date: [November 18, 2021, 3:45pm UTC](https://community.prismic.io/t/create-new-theme-not-working/7904/9 "2021-11-18T15:45:38Z")

</div>

prismic-cli/4.2.0 linux-x64 node-v17.0.1

I was also able to run the command successfully on someone else computer

---

<div class="post-metadata">

### Author: ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)
#### Post date: [November 18, 2021, 5:04pm UTC](https://community.prismic.io/t/create-new-theme-not-working/7904/10 "2021-11-18T17:04:40Z")

</div>

Ok, I was able to reproduce the error. It seems like it won't work with the latest version of node. Can you try with the recommended one: `16.13.0`?

---

<div class="post-metadata">

### Author: ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)
#### Post date: [November 25, 2021, 8:38pm UTC](https://community.prismic.io/t/create-new-theme-not-working/7904/11 "2021-11-25T20:38:28Z")

</div>

Hello team. We close the threads after a week with no new activity. If this happens and you want to continue the conversation, you can easily flag it to reopen it and add a new comment.  
Thanks.

---

<div class="post-metadata">

### Author: ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)
#### Post date: [November 25, 2021, 8:38pm UTC](https://community.prismic.io/t/create-new-theme-not-working/7904/12 "2021-11-25T20:38:31Z")

</div>

Threads close after a period of inactivity. [Flag this thread](https://community.prismic.io/t/re-open-a-thread/2175) to re-open it and continue the conversation.

---

<div class="post-metadata">

### Author: ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)
#### Post date: [December 9, 2021, 3:15pm UTC](https://community.prismic.io/t/create-new-theme-not-working/7904/13 "2021-12-09T15:15:55Z")

</div>


