Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build project: TypeError: console.log.bind is not a function #298

Open
noahbald opened this issue Nov 29, 2021 · 0 comments
Open

Comments

@noahbald
Copy link

Hey,
I've been running into this issue where some of my dependencies rely on console[method].bind(console), but it seems that the engine being used to build the plugin doesn't support this.
I've tried using a polyfill from core-js but I can't seem to get it to run from the entry of my built command, so I've had to resort to editing the function call out from my node_modules.

Ideally there should be a polyfill or something to get around this in the skpm-build step.

Here's the error message I'm gettting


> my-plugin@0.1.0 render:once
> skpm-build --run

[1/4] 🖨  Copied src/manifest.json in 2ms
[2/4] ⛏  Copied assets/icon.png
[3/4] ⚒  Built resources/webview.js in 7966ms
TypeError: console.log.bind is not a function. (In 'console.log.bind(console)', 'console.log.bind' is undefined)
    at /Users/username/Projects/example/my-plugin/my-plugin.sketchplugin/Contents/Sketch/__my-command_ts:61252:4091
    at /Users/username/Projects/example/my-plugin/my-plugin.sketchplugin/Contents/Sketch/__my-command_ts:61202:42
    at /Users/username/Projects/example/my-plugin/my-plugin.sketchplugin/Contents/Sketch/__my-command_ts:61205:2
    at . (/node_modules/sass.js/dist/sass.sync.js@/Users/username/Projects/example/my-plugin/my-plugin.sketchplugin/Contents/Sketch/__my-command_ts:62017:34)
    at __webpack_require__ (/Users/username/Projects/example/my-plugin/my-plugin.sketchplugin/Contents/Sketch/__my-command_ts:27:34)
    at /Users/username/Projects/example/my-plugin/my-plugin.sketchplugin/Contents/Sketch/__my-command_ts:102739:84
    at . (/src/scripts/build.ts@/Users/username/Projects/example/my-plugin/my-plugin.sketchplugin/Contents/Sketch/__my-command_ts:102800:34)
    at __webpack_require__ (/Users/username/Projects/example/my-plugin/my-plugin.sketchplugin/Contents/Sketch/__my-command_ts:27:34)
    at . (/src/my-command.ts@/Users/username/Projects/example/my-plugin/my-plugin.sketchplugin/Contents/Sketch/__my-command_ts:102644:91)
    at __webpack_require__ (/Users/username/Projects/example/my-plugin/my-plugin.sketchplugin/Contents/Sketch/__my-command_ts:27:34)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant