Error: Cannot find module (creating theme)

Hi,

I am following the tutorial and I got an error customising my theme

  1. I changed the line after packed as instructed in the video https://www.youtube.com/watch?v=QFY3GPfoKR4 around 42:00
    },
    “packages”: [
    {
    “name”: “storygenietheme”,
    “name”: “@frontity/wp-source”,
    “state”: {

  2. I went back to the terminal and ran frontity nx dev

  3. I was prompted to open in a new window because I was already running local 3000 but I decided to run it on the same server.

  4. When I went back to the site and refreshed the page I got the cannot find module error ( don’t have a screenshot)

Should I start over? I got the theme folder installed

but the site is now inaccessible

This site can’t be reached

localhost refused to connect.

Try:

ERR_CONNECTION_REFUSED

Thank you for your help.

Stephen

Hi @stblackman

In order to provide the best possible help as quickly and as efficiently as possible, can you please provide the info suggested here?

Providing a repo or code-sandbox with your code is especially helpful to find solutions of technical issues with specific code

Hi,

Ì managed to find th error message which has all of the information

ModuleBuildError: Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: /Users/stephenblackman/Downloads/story-genies-wiki/frontity.settings.js: Unexpected token (26:1)

e[0m e[90m 24 | e[39me[0m
e[0m e[90m 25 | e[39me[36mexporte[39m e[36mdefaulte[39m settingse[33m;e[39me[0m
e[0me[31me[1m>e[22me[39me[90m 26 | e[39me[33m!e[39me[0m
e[0m e[90m | e[39m e[31me[1m^e[22me[39me[0m
at Object._raise (/Users/stephenblackman/Downloads/story-genies-wiki/node_modules/@babel/parser/src/parser/error.js:60:45)
at Object.raiseWithData (/Users/stephenblackman/Downloads/story-genies-wiki/node_modules/@babel/parser/src/parser/error.js:55:17)
at Object.raise (/Users/stephenblackman/Downloads/story-genies-wiki/node_modules/@babel/parser/src/parser/error.js:39:17)
at Object.unexpected (/Users/stephenblackman/Downloads/story-genies-wiki/node_modules/@babel/parser/src/parser/util.js:152:16)
at Object.parseExprAtom (/Users/stephenblackman/Downloads/story-genies-wiki/node_modules/@babel/parser/src/parser/expression.js:1195:20)
at Object.parseExprAtom (/Users/stephenblackman/Downloads/story-genies-wiki/node_modules/@babel/parser/src/plugins/jsx/index.js:535:22)
at Object.parseExprSubscripts (/Users/stephenblackman/Downloads/story-genies-wiki/node_modules/@babel/parser/src/parser/expression.js:548:23)
at Object.parseMaybeUnary (/Users/stephenblackman/Downloads/story-genies-wiki/node_modules/@babel/parser/src/parser/expression.js:528:21)
at Object.parseMaybeUnary (/Users/stephenblackman/Downloads/story-genies-wiki/node_modules/@babel/parser/src/parser/expression.js:500:28)
at Object.parseExprOps (/Users/stephenblackman/Downloads/story-genies-wiki/node_modules/@babel/parser/src/parser/expression.js:319:23)
at /Users/stephenblackman/Downloads/story-genies-wiki/node_modules/webpack/lib/NormalModule.js:316:20
at /Users/stephenblackman/Downloads/story-genies-wiki/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /Users/stephenblackman/Downloads/story-genies-wiki/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/Users/stephenblackman/Downloads/story-genies-wiki/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /Users/stephenblackman/Downloads/story-genies-wiki/node_modules/babel-loader/lib/index.js:59:103

Hi @stblackman

Did you manage to solve this issue?

Hi,

I haven’t looked at it since then because I need to have it fixed by February instead of by September. If you have any suggestions now that would be helpful but I will attack it myself later in the year.

Thanks for following up.

Best regards,

Stephen

You cannot display a lot of websites inside an iFrame. Reason being that they send an “X-Frame-Options: SAMEORIGIN” response header. This option prevents the browser from displaying iFrames that are not hosted on the same domain as the parent page.

I faced the same error when embed YouTube links. For example: https://www.youtube.com/watch?v=8WkuChVeL0s

I replaced watch?v= with embed/ so the valid link will be: https://www.youtube.com/embed/8WkuChVeL0s

It works well.

Try to apply the same rule on your case.

SAMEORIGIN

The page can only be displayed in a frame on the same origin as the page itself. The spec leaves it up to browser vendors to decide whether this option applies to the top level, the parent, or the whole chain, although it is argued that the option is not very useful unless all ancestors are also in the same origin.