Issue with fdk theme sync command

Hi ,
I am getting following error while running fdk sync command.
FDK-0004 - Cannot read properties of undefined (reading ‘prototype’)

Hello @Shirin ,

This error is from webpack. Webpack is using @vue/cli-plugin-babel/preset as a presets. This package is using @vue/babel-preset-app as a dependency. While bundling webpack is uses “@vue/babel-preset-app” & “@vue/cli-plugin-babel”. Check version of this packages by running npm ls OR npm ls —depth 2 command. If the version of @vue/babel-preset-app is 4.5.19 then it could be cause of the issue.

  1. Remove node_modules and package-lock.json. Then run npm cache clean --force.

  2. Update devDependencies in the package.json of the theme:
    “devDependencies”: {

    @vue/cli-plugin-babel”: “4.5.18”,
    @vue/babel-preset-app”: “4.5.18”
    },

  3. Try updating both of these packages to version 4.5.18. Run the npm ls command again.
    @vue/[email protected]
    @babel/[email protected] deduped
    @vue/[email protected]

  4. Now try running fdk theme serve.

This should work, do let us know if you still face this issue.

2 Likes

The issue has been resolved after following the steps mentioned.
Thanks a lot, @afrozshaikh :slight_smile:

1 Like

Hi @afrozshaikh ,
I am getting a new error in theme sync :-

node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^

[Error: EEXIST: file already exists, mkdir ‘.fdk/temp-theme’] {
errno: -17,
code: ‘EEXIST’,
syscall: ‘mkdir’,
path: ‘.fdk/temp-theme’
}

Hello @Shirin

To fix this “EEXIST: file already exists” error, remove or rename the existing .fdk/temp-theme directory in your filesystem. This error occurred because your code was trying to create a directory that already existed, which is not allowed.

1 Like