Scaffold error during extension init

Hello,

Probably a dump question, but I am stuck at the first stage

❯ webflow extension init ext1

Scaffolding your new extension named: ext1…
(node:42724) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)
node:internal/fs/promises:949
const result = await PromisePrototypeThen(
^

Error: ENOENT: no such file or directory, scandir ‘/opt/homebrew/lib/node_modules/@webflow/webflow-cli/dist/scaffolds/’
at async Object.readdir (node:internal/fs/promises:949:18)
at async hTe (/opt/homebrew/lib/node_modules/@webflow/webflow-cli/dist/index.js:1019:353)
at async Command._2t (/opt/homebrew/lib/node_modules/@webflow/webflow-cli/dist/index.js:1019:1469) {
errno: -2,
code: ‘ENOENT’,
syscall: ‘scandir’,
path: ‘/opt/homebrew/lib/node_modules/@webflow/webflow-cli/dist/scaffolds/’
}

Node.js v21.7.1 (macOS 13.6.4)

Node16 or later is required according to the manual and apart from the brewed v21 I was trying without any luck against v18 downloaded directly from nodejs.org. I am run out of ideas, where can be a problem?

Thank you in advance.

Hi Daniel,

Can I ask what version of the cli you have installed?

And what do you see if you try to list the directory /opt/homebrew/lib/node_modules/@webflow/webflow-cli/dist/scaffolds/

To unblock you in the meantime, the default app template is available here: GitHub - Webflow-Examples/emoji-text: A simple Designer Extension that inserts a text emoji into the canvas, with guidance on how to work with styles.

Let me know if you’re able to install/run/serve it using webflow extension serve

Hi Dmitry,
Thank you for joining the thread.

  1. I have installed the latest one - 1.6.7 (I will try to downgrade because you are asking)
  2. scaffolds directory does not exist

some listing:

/opt/homebrew/lib/node_modules/@webflow/webflow-cli stable ❯ ls -la                                                                                                             23:11:43
total 32
drwxr-xr-x  8 danilabagroff  admin   256 Mar 13 23:26 .
drwxr-xr-x  3 danilabagroff  admin    96 Mar 13 23:26 ..
-rw-r--r--  1 danilabagroff  admin  2222 Mar 13 23:26 CHANGELOG.md
-rw-r--r--  1 danilabagroff  admin  1087 Mar 13 23:26 LICENCE
-rw-r--r--  1 danilabagroff  admin  3274 Mar 13 23:26 README.md
drwxr-xr-x  3 danilabagroff  admin    96 Mar 13 23:26 dist
drwxr-xr-x  3 danilabagroff  admin    96 Mar 13 23:26 node_modules
-rw-r--r--  1 danilabagroff  admin   719 Mar 13 23:26 package.json
/opt/homebrew/lib/node_modules/@webflow/webflow-cli stable ❯ ls -la dist                                                                                                        23:11:44
total 13512
drwxr-xr-x  3 danilabagroff  admin       96 Mar 13 23:26 .
drwxr-xr-x  8 danilabagroff  admin      256 Mar 13 23:26 ..
-rwxr-xr-x  1 danilabagroff  admin  6915889 Mar 13 23:26 index.js
/opt/homebrew/lib/node_modules/@webflow/webflow-cli stable ❯ ls -la node_modules                                                                                                23:11:48
total 0
drwxr-xr-x   3 danilabagroff  admin   96 Mar 13 23:26 .
drwxr-xr-x   8 danilabagroff  admin  256 Mar 13 23:26 ..
drwxr-xr-x  10 danilabagroff  admin  320 Mar 13 23:26 commander
/opt/homebrew/lib/node_modules/@webflow/webflow-cli stable ❯ ls -la node_modules/commander                                                                                      23:11:52
total 128
drwxr-xr-x  10 danilabagroff  admin    320 Mar 13 23:26 .
drwxr-xr-x   3 danilabagroff  admin     96 Mar 13 23:26 ..
-rw-r--r--   1 danilabagroff  admin   1098 Mar 13 23:26 LICENSE
-rw-r--r--   1 danilabagroff  admin  41693 Mar 13 23:26 Readme.md
-rw-r--r--   1 danilabagroff  admin    309 Mar 13 23:26 esm.mjs
-rw-r--r--   1 danilabagroff  admin    798 Mar 13 23:26 index.js
drwxr-xr-x   8 danilabagroff  admin    256 Mar 13 23:26 lib
-rw-r--r--   1 danilabagroff  admin    231 Mar 13 23:26 package-support.json
-rw-r--r--   1 danilabagroff  admin   2116 Mar 13 23:26 package.json
drwxr-xr-x   3 danilabagroff  admin     96 Mar 13 23:26 typings

1.6.6 works as expected — extension was successfully initialized

1 Like

Thanks @danilabagroff ! Downgrading to 1.6.6 did the trick.

npm i @webflow/webflow-cli@1.6.6 -g

As @dmitrypimenov mentions, the scaffolding action is simply a copy/paste of the emoji-text template.

And as far as I could tell, the only important parts are the script for using the dev-server webflow extension serve and the script for building the package webflow extension bundle.

You are not missing out on much from the scaffolding.