Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[BUG] plasmo init fails for "sharp" module #176

Closed
2 tasks done
andrew-x opened this issue Sep 3, 2022 · 6 comments
Closed
2 tasks done

[BUG] plasmo init fails for "sharp" module #176

andrew-x opened this issue Sep 3, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@andrew-x
Copy link

andrew-x commented Sep 3, 2022

What happened?

When running npm x plasmo init or installing plasmo globally and simply running plasmo init, I get the same error:

.nvm/versions/node/v16.14.0/lib/node_modules/plasmo/node_modules/sharp/lib/sharp.js:34
  throw new Error(help.join('\n'));
        ^

Error:
Something went wrong installing the "sharp" module

Cannot find module '../build/Release/sharp-darwin-x64.node'

I am on Macbook Pro - Monterey v12.4
My node version is v16.14.0

Please let me know if there's something I'm missing, thank you!

Version

Latest

What OS are you seeing the problem on?

MacOSX

What browsers are you seeing the problem on?

No response

Relevant log output

.nvm/versions/node/v16.14.0/lib/node_modules/plasmo/node_modules/sharp/lib/sharp.js:34
  throw new Error(help.join('\n'));
        ^

Error:
Something went wrong installing the "sharp" module

Cannot find module '../build/Release/sharp-darwin-x64.node'

(OPTIONAL) Contact Details

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I checked the current issues for duplicate problems.
@andrew-x andrew-x added the bug Something isn't working label Sep 3, 2022
@louisgv
Copy link
Contributor

louisgv commented Sep 4, 2022

Can you try to init an empty node project and add the sharp library as a dependency, and see if you can reproduce it there?

@andrew-x
Copy link
Author

andrew-x commented Sep 4, 2022

Oh yup, forgot to add that in the original description but yes I tried it, still got the same error unfortunately.

@andrew-x
Copy link
Author

andrew-x commented Sep 4, 2022

To be more clear, I didn't get any error when just running npm i sharp or even npm i -g sharp. But I got the error when running plasmo init even in the same directory with sharp already installed

@louisgv
Copy link
Contributor

louisgv commented Sep 4, 2022

Can you try using npm create plasmo --verbose, seems like the issue happens during deps install :d...

@andrew-x
Copy link
Author

andrew-x commented Sep 4, 2022

running npm create plasmo or yarn create plasmo works! Weird that it only fails for npm x plasmo init

@louisgv
Copy link
Contributor

louisgv commented Sep 4, 2022

running npm create plasmo or yarn create plasmo works! Weird that it only fails for npm x plasmo init

We will likely deprecate that method since npm x runs npm exec, which might botch some of the native linkage ;d...

@PlasmoHQ PlasmoHQ locked and limited conversation to collaborators Sep 4, 2022
@louisgv louisgv converted this issue into discussion #181 Sep 4, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants