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

Could not build with apple silicon #69

Open
Borealin opened this issue Nov 8, 2021 · 3 comments
Open

Could not build with apple silicon #69

Borealin opened this issue Nov 8, 2021 · 3 comments

Comments

@Borealin
Copy link

Borealin commented Nov 8, 2021

I'm developing a sketch plugin and I want to make use of sketch-dev-tools, I found the plugin directly download from release could not work due to compatibility issue, so I turn to clone the repo and try to build by myself.
And I got error log like below:

❯ npm run build

> @skpm/[email protected] build
> skpm-build && (mkdir dev-tools.sketchplugin/Contents/Resources/.scripts || true)

[1/8] 🖨  Copied src/manifest.json in 1ms
[2/8] 🔧  Copied assets/package.json
[3/8] ⚒  Copied assets/build-script.js
[4/8] 🔩  Copied assets/icon.png
[5/8] 🛠  Built ./test-log.js in 800ms
error Error while building ./show-debugger.js
./resources/webview.html
Module build failed (from ./node_modules/_@[email protected]@@skpm/extract-loader/lib/extractLoader.js):
ModuleBuildError: Module build failed (from ./node_modules/_@[email protected]@@skpm/extract-loader/lib/extractLoader.js):
NonErrorEmittedError: (Emitted value instead of an instance of Error) TypeError: require(...) is not a function
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@webpack/lib/NormalModule.js:313:13
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:367:11
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:233:18
    at runSyncOrAsync (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:143:3)
    at iterateNormalLoaders (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:232:2)
    at iterateNormalLoaders (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:221:10)
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:236:3
    at context.callback (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:111:13)
    at Object.<anonymous> (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@css-loader/lib/loader.js:133:3)
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@css-loader/lib/processCss.js:193:3
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@webpack/lib/NormalModule.js:316:20
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:367:11
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:233:18
    at runSyncOrAsync (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:143:3)
    at iterateNormalLoaders (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:232:2)
    at iterateNormalLoaders (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:221:10)
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:236:3
    at context.callback (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:111:13)
    at Object.<anonymous> (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@css-loader/lib/loader.js:133:3)
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@css-loader/lib/processCss.js:193:3
 @ ./src/show-debugger.js 54:24-60
./node_modules/[email protected]@codemirror/lib/codemirror.css
Module build failed (from ./node_modules/_@[email protected]@@skpm/extract-loader/lib/extractLoader.js):
NonErrorEmittedError: (Emitted value instead of an instance of Error) TypeError: require(...) is not a function
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@webpack/lib/NormalModule.js:313:13
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:367:11
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:233:18
    at runSyncOrAsync (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:143:3)
    at iterateNormalLoaders (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:232:2)
    at iterateNormalLoaders (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:221:10)
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:236:3
    at context.callback (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:111:13)
    at Object.<anonymous> (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@css-loader/lib/loader.js:133:3)
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@css-loader/lib/processCss.js:193:3
 @ ./resources/webview.html ../node_modules/codemirror/lib/codemirror.css
 @ ./src/show-debugger.js
./resources/style.css
Module build failed (from ./node_modules/_@[email protected]@@skpm/extract-loader/lib/extractLoader.js):
NonErrorEmittedError: (Emitted value instead of an instance of Error) TypeError: require(...) is not a function
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@webpack/lib/NormalModule.js:313:13
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:367:11
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:233:18
    at runSyncOrAsync (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:143:3)
    at iterateNormalLoaders (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:232:2)
    at iterateNormalLoaders (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:221:10)
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:236:3
    at context.callback (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:111:13)
    at Object.<anonymous> (/Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@css-loader/lib/loader.js:133:3)
    at /Users/borealin/Documents/inlab/sketch-dev-tools/node_modules/[email protected]@css-loader/lib/processCss.js:193:3
 @ ./resources/webview.html ./style.css
 @ ./src/show-debugger.js

Could you help me find if it's due to my config or arm architecture?

@narol1024
Copy link

narol1024 commented Jun 8, 2022

This commit is a workaround.

narol1024@7ae357e

And you could download the plugin file directly.

https://github.com/inarol/sketch-dev-tools/releases/tag/v0.9.10

@laommmm
Copy link

laommmm commented Jul 20, 2022

This commit is a workaround.

inarol@7ae357e

And you could download the plugin file directly.

https://github.com/inarol/sketch-dev-tools/releases/tag/v0.9.10

thx

@mathieudutour
Copy link
Member

@inarol do you want to open up a PR to this repo? Happy to merge it. I can't seem to see what's the actual fix in the commit

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

4 participants