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

issue with running npm run dev #4052

Closed
2 tasks done
ElonMuskOfficial opened this issue Jun 14, 2024 · 10 comments
Closed
2 tasks done

issue with running npm run dev #4052

ElonMuskOfficial opened this issue Jun 14, 2024 · 10 comments
Labels
Area: Functions issues with functions Type: Bug Something isn't working

Comments

@ElonMuskOfficial
Copy link

Please confirm that you have:

  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Function

Expected behavior

This should run without any errors

Actual behavior

I am just installed Cart Transform Function setup
and then run this and getting this error

── external error ────────────────────────────────────────────────────────────────────

Error coming from npm exec -- javy-cli --version

Command failed with exit code 3221225477: npm exec -- javy-cli --version

────────────────────────────────────────────────────────────────────────────────

Verbose output

npm run dev -- --verbose

npm verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
npm info using [email protected]
npm info using [email protected]
npm verbose title npm run dev
npm verbose argv "run" "dev" "--loglevel" "verbose"
npm verbose logfile logs-max:10 dir:C:\Users\ElonMusk\AppData\Local\npm-cache\_logs\2024-06-14T10_59_59_726Z-
npm verbose logfile C:\Users\ElonMusk\AppData\Local\npm-cache\_logs\2024-06-14T10_59_59_726Z-debug-0.log

> [email protected] dev
> shopify app dev

16:30:12 │ graphiql         │ GraphiQL server started on port 3457

── external error ────────────────────────────────────────────────────────────────────

Error coming from `npm exec -- javy-cli --version`

Command failed with exit code 3221225477: npm exec -- javy-cli --version
npm verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
npm info using [email protected]
npm info using [email protected]
npm verbose title npm exec javy-cli --version
npm verbose argv "exec" "--" "javy-cli" "--version"
npm verbose logfile logs-max:10 dir:C:\Users\ElonMusk\AppData\Local\npm-cache\_logs\2024-06-14T11_00_12_665Z-
npm verbose logfile C:\Users\ElonMusk\AppData\Local\npm-cache\_logs\2024-06-14T11_00_12_665Z-debug-0.log
npm verbose shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: extensions/cart-transformer
npm http fetch GET 200 https://registry.npmjs.org/javy-cli 1043ms (cache revalidated)
npm verbose cwd D:\SHOPIFY\cart-transform-api
npm verbose os Windows_NT 10.0.22631
npm verbose node v20.10.0
npm verbose npm  v10.8.1
npm verbose exit 3221225477
npm verbose code 3221225477

──────────────────────────────────────────────────────────────────────────────────────

npm verbose cwd D:\SHOPIFY\cart-transform-api
npm verbose os Windows_NT 10.0.22631
npm verbose node v20.10.0
npm verbose npm  v10.8.1
npm verbose exit 1
npm verbose code 1

Reproduction steps

  1. npm run dev -- --verbose

Operating System

Windows 11

Shopify CLI version (check your project's package.json if you're not sure)

3.61.2

Shell

No response

Node version (run node -v if you're not sure)

20.10.0

What language and version are you using in your application?

No response

@ElonMuskOfficial ElonMuskOfficial added the Type: Bug Something isn't working label Jun 14, 2024
@HitenXCode
Copy link

HitenXCode commented Jun 15, 2024

facing same issue with the shipping discount extension

@zane-wky
Copy link

#2626 Someone mentioned the same problem in this link

@ElonMuskOfficial
Copy link
Author

@zane-wky I tried but it not working in my system

@ElonMuskOfficial
Copy link
Author

I found a solution to the issue. Here are the steps I followed:

  1. Downloaded javy-x86_64-windows-v1.4.0.gz from the Javy GitHub releases page.

  2. Extracted the file to get javy.exe.

  3. Copied javy.exe to the directory: C:\Users\<username>\AppData\Local\binarycache\Cache.

  4. Renamed javy.exe to javy-v2.0.0 (removed the .exe extension).

  5. Ran the project again, and it worked successfully.

These steps resolved the issue for me.

Hope this helps!

@amcaplan amcaplan added the Area: Functions issues with functions label Jun 16, 2024
@Chris-Okendo
Copy link

Chris-Okendo commented Jun 17, 2024

Im seeing the same error come from shopify app function build when trying to build a discount extension

Swapping in the binary from the Javy release page hasnt resolved it and neither has using the FORCE_RELEASE env var that is provided by Javy. Ive also deleted the javy binaries from the cache as mentioned here and here

Update

After trying the binary download and rename to no avail i was able to get a fix by doing the following

  1. Invoke the javy binary directly via cmd not powershell
  2. This gave me an error like below
Administrator@ip-AC1F06F2 MINGW64 ~/AppData/Local/binarycache/Cache
$ ./javy-v2.0.0
C:/Users/Administrator/AppData/Local/binarycache/Cache/javy-v2.0.0: error while loading shared libraries: VCRUNTIME140_1.dll: cannot open shared object file: No such file or directory
  1. a quick google told me the missing .dll was provided by microsoft via this redist
  2. downloaded and installed the latest for my arch
  3. build runs successfully using the latest javy version without any binary renames or manual downloads.

@HitenXCode
Copy link

below solution worked for me!!!

I found a solution to the issue. Here are the steps I followed:

Downloaded javy-x86_64-windows-v1.4.0.gz from the Javy GitHub releases page.

Extracted the file to get javy.exe.

Copied javy.exe to the directory: C:\Users<username>\AppData\Local\binarycache\Cache.

Renamed javy.exe to javy-v2.0.0 (removed the .exe extension).

Ran the project again, and it worked successfully.

These steps resolved the issue for me.

Hope this helps!

@nickwesselman
Copy link
Contributor

Installing Visual C++ Redistributable appears to be the right solution — I would not recommend renaming binaries as there are great things in Javy 2.0 that you will want to take advantage of.

We are looking into why this dependency was introduced and whether we can remove it.

@saulecabrera
Copy link
Member

saulecabrera commented Jun 17, 2024

I've opened bytecodealliance/javy#670 and I've confirmed that it fixes the issues and restores the behavior of the previous version (which doesn't require installing Visual C++).

@jantnovi
Copy link

Resolved

@lucas-paiano
Copy link

what did the job for me was, as mentioned here, deleting the file located in C:\Users<user>\AppData\Local\binarycache\Cache.
But, instead of downloading it from their repo. I updated shopify cli. That installed its latest version into that same folder.
I also have the latest stable version of node.js and npm. I dont know if that had anything to do with this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Functions issues with functions Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants