figma-html
figma-html copied to clipboard
Uncaught TypeError: html_to_figma_1.htmlToFigma is not a function
Hello,
I was trying to run chrome extension and I'm stuck because when I tried to run it with npm run watch
command, it threw this error as soon as I clicked on the "Capture Current Page" button:
Uncaught TypeError: html_to_figma_1.htmlToFigma is not a function

Do you have any idea what I can do now? Please advise.
Thank you.
hey @studiotimo - that's odd, I just did the following and it worked as expected, are these any different than your steps?
cd chrome-extension
npm install
npm run watch
then I went to chrome://extensions and chose "load unpacked" and then chose chrome-extension/dist
folder
then I went to disney.com
and found the HTML <> Figma
extension and chose "Capture current page" and it downloaded as expected
Thanks, @steve8708 . I tried it again from scratch, but this time, for some reason, I'm having trouble in npm install
. I got a lot of errors related to libsass. (Please see the attached screenshot.) This stackoverflow thread shows the same kind of error message in console. I guess this has something to do with Node.js version, node-sass version, and etc. Could you share the version number of Node.js and node-sass in your computer? (My Node.js version was v14.17.4 (and I tried upgrading to v16.7.0) and it didn't work either way.)
On the other hand, I found a workaround by bundling inject.ts only, instead of using npm run watch
command. So I'm able to run the chrome extension locally. Since the issue is not a blocker for me, you may close this issue if you want. If you can add your version number of Node.js and node-sass, though, before closing this, it could be helpful for me and others. Thank you!
