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

node-gyp #73

Closed
FlutterReactDev opened this issue Jan 24, 2024 · 13 comments
Closed

node-gyp #73

FlutterReactDev opened this issue Jan 24, 2024 · 13 comments
Labels

Comments

@FlutterReactDev
Copy link

Describe the bug
node-gyp error

Console:

[email protected] build-release
node-gyp rebuild --release

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info find Python using Python version 3.12.1 found at "C:\Users\User\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\python.exe"
gyp ERR! find VS
gyp ERR! find VS msvs_version was set from command line or npm config
gyp ERR! find VS - looking for Visual Studio version 2019
gyp ERR! find VS running in VS Command Prompt, installation path is:
gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2019\Community"
gyp ERR! find VS - will only use this version
gyp ERR! find VS checking VS2019 (16.11.34407.143) found at:
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
gyp ERR! find VS - found "Visual Studio C++ core features"
gyp ERR! find VS - found VC++ toolset: v142
gyp ERR! find VS - found Windows SDK: 10.0.19041.0
gyp ERR! find VS - does not match this Visual Studio Command Prompt
gyp ERR! find VS checking VS2019 (16.11.34407.143) found at:
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
gyp ERR! find VS - found "Visual Studio C++ core features"
gyp ERR! find VS - found VC++ toolset: v142
gyp ERR! find VS - found Windows SDK: 10.0.19041.0
gyp ERR! find VS - does not match this Visual Studio Command Prompt
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS msvs_version does not match this VS Command Prompt or the
gyp ERR! find VS installation cannot be used.
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack at VisualStudioFinder.fail (D:\medusa-strapi-repo\node_modules@lerna\add\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack at D:\medusa-strapi-repo\node_modules@lerna\add\node_modules\node-gyp\lib\find-visualstudio.js:74:16gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (D:\medusa-strapi-repo\node_modules@lerna\add\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack at D:\medusa-strapi-repo\node_modules@lerna\add\node_modules\node-gyp\lib\find-visualstudio.js:70:14gyp ERR! stack at D:\medusa-strapi-repo\node_modules@lerna\add\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack at D:\medusa-strapi-repo\node_modules@lerna\add\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack at D:\medusa-strapi-repo\node_modules@lerna\add\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack at ChildProcess.exithandler (node:child_process:430:5)
gyp ERR! stack at ChildProcess.emit (node:events:517:28)
gyp ERR! stack at maybeClose (node:internal/child_process:1098:16)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "C:\Program Files\nodejs\node.exe" "D:\medusa-strapi-repo\node_modules\@lerna\add\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release"
gyp ERR! cwd D:\medusa-strapi-repo\node_modules\better-sqlite3

Copy link

Hi Thank you for highlighting this issue.

@ivanushkaPr
Copy link

ivanushkaPr commented Feb 6, 2024

Same here, then i try to run yarn install from medusa-strapi folder.

[5/5] Building fresh packages...
[-/15] ⡀ waiting...
[-/15] ⡀ waiting...
[-/15] ⡀ waiting...
[-/15] ⡀ waiting...
error C:\Work\medusa-strapi-repo\node_modules\better-sqlite3: Command failed.
Exit code: 1
Command: prebuild-install || npm run build-release
Arguments:
Directory: C:\Work\medusa-strapi-repo\node_modules\better-sqlite3
Output:
prebuild-install warn install No prebuilt binaries found (target=18.17.1 runtime=node arch=x64 libc= platform=win32)

[email protected] build-release
node-gyp rebuild --release

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info find Python using Python version 3.11.5 found at "C:\Users\admin\AppData\Local\Programs\Python\Python311\python.exe"
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS unknown version "undefined" found at "C:\Program Files\Microsoft Visual Studio\2022\Community"
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack at VisualStudioFinder.fail (C:\Work\medusa-strapi-repo\node_modules@lerna\add\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack at maybeClose (node:internal/child_process:1091:16)
gyp ERR! System Windows_NT 10.0.22621
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Work\medusa-strapi-repo\node_modules\@lerna\add\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release"
gyp ERR! cwd C:\Work\medusa-strapi-repo\node_modules\better-sqlite3

@SGFGOV
Copy link
Owner

SGFGOV commented Feb 6, 2024 via email

@ivanushkaPr
Copy link

Hy SGFGOV. Looks like you was right.

I tried to install it on wsl, and looks like it worked. But i needed to run yarn install in /packages/medusa-strapi folder, before running yarn run build. And this step is missing in the guide, so for guy who never worked with yarn before it was quest)

But, after executing 'yarn run build' in '/packages/medusa-strapi' i get another error. And of course, there is no such folder there. So the case is its not builded or should i maybe build it from another folder? Not from './packages/medusa-strapi' as documentation said?

ivan@DESKTOP-R9FI6DE:~/medusa-strapi-repo/packages/medusa-strapi$ yarn run build
yarn run v1.22.4
$ strapi build
Building your admin UI with development configuration...

● Webpack █████████████████████████ building (32%) 1/1 entries 201/481 dependencies 65/168 modules 72 active
../../node_modules/lodash/_setToString.js

ModuleNotFoundError: Module not found: Error: Can't resolve './dist/admin/src' in '/home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs'
at /home/ivan/medusa-strapi-repo/node_modules/webpack/lib/Compilation.js:2022:28
at /home/ivan/medusa-strapi-repo/node_modules/webpack/lib/NormalModuleFactory.js:817:13
at eval (eval at create (/home/ivan/medusa-strapi-repo/node_modules/tapable/lib/HookCodeFactory.js:33:10), :10:1)
at /home/ivan/medusa-strapi-repo/node_modules/webpack/lib/NormalModuleFactory.js:275:22
at eval (eval at create (/home/ivan/medusa-strapi-repo/node_modules/tapable/lib/HookCodeFactory.js:33:10), :9:1)
at /home/ivan/medusa-strapi-repo/node_modules/webpack/lib/NormalModuleFactory.js:448:22
at /home/ivan/medusa-strapi-repo/node_modules/webpack/lib/NormalModuleFactory.js:118:11
at /home/ivan/medusa-strapi-repo/node_modules/webpack/lib/NormalModuleFactory.js:689:25
at /home/ivan/medusa-strapi-repo/node_modules/webpack/lib/NormalModuleFactory.js:893:8
at /home/ivan/medusa-strapi-repo/node_modules/webpack/lib/NormalModuleFactory.js:1013:5
resolve './dist/admin/src' in '/home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs'
using description file: /home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs/package.json (relative path: .)
Field 'browser' doesn't contain a valid alias configuration
using description file: /home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs/package.json (relative path: ./dist/admin/src)
no extension
Field 'browser' doesn't contain a valid alias configuration
/home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs/dist/admin/src doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs/dist/admin/src.js doesn't exist
.jsx
Field 'browser' doesn't contain a valid alias configuration
/home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs/dist/admin/src.jsx doesn't exist
.react.js
Field 'browser' doesn't contain a valid alias configuration
/home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs/dist/admin/src.react.js doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
/home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs/dist/admin/src.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
/home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs/dist/admin/src.tsx doesn't exist
as directory
/home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs/dist/admin/src doesn't exist
ModuleNotFoundError: Module not found: Error: Can't resolve './dist/admin/src' in '/home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs'
at /home/ivan/medusa-strapi-repo/node_modules/webpack/lib/Compilation.js:2022:28
at /home/ivan/medusa-strapi-repo/node_modules/webpack/lib/NormalModuleFactory.js:817:13
at eval (eval at create (/home/ivan/medusa-strapi-repo/node_modules/tapable/lib/HookCodeFactory.js:33:10), :10:1)
at /home/ivan/medusa-strapi-repo/node_modules/webpack/lib/NormalModuleFactory.js:275:22
at eval (eval at create (/home/ivan/medusa-strapi-repo/node_modules/tapable/lib/HookCodeFactory.js:33:10), :9:1)
at /home/ivan/medusa-strapi-repo/node_modules/webpack/lib/NormalModuleFactory.js:448:22
at /home/ivan/medusa-strapi-repo/node_modules/webpack/lib/NormalModuleFactory.js:118:11
at /home/ivan/medusa-strapi-repo/node_modules/webpack/lib/NormalModuleFactory.js:689:25
at /home/ivan/medusa-strapi-repo/node_modules/webpack/lib/NormalModuleFactory.js:893:8
at /home/ivan/medusa-strapi-repo/node_modules/webpack/lib/NormalModuleFactory.js:1013:5
resolve './dist/admin/src' in '/home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs'
using description file: /home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs/package.json (relative path: .)
Field 'browser' doesn't contain a valid alias configuration
using description file: /home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs/package.json (relative path: ./dist/admin/src)
no extension
Field 'browser' doesn't contain a valid alias configuration
/home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs/dist/admin/src doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs/dist/admin/src.js doesn't exist
.jsx
Field 'browser' doesn't contain a valid alias configuration
/home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs/dist/admin/src.jsx doesn't exist
.react.js
Field 'browser' doesn't contain a valid alias configuration
/home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs/dist/admin/src.react.js doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
/home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs/dist/admin/src.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
/home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs/dist/admin/src.tsx doesn't exist
as directory
/home/ivan/medusa-strapi-repo/packages/strapi-plugin-medusajs/dist/admin/src doesn't exist
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I think there is an issue building on windows

On Tue, 6 Feb, 2024, 7:42 pm ivanushkaPr, @.> wrote: Same here.[5/5] Building fresh packages... [-/15] ⡀ waiting... [-/15] ⡀ waiting... [-/15] ⡀ waiting... [-/15] ⡀ waiting... error C:\Work\medusa-strapi-repo\node_modules\better-sqlite3: Command failed. Exit code: 1 Command: prebuild-install || npm run build-release Arguments: Directory: C:\Work\medusa-strapi-repo\node_modules\better-sqlite3 Output: prebuild-install warn install No prebuilt binaries found (target=18.17.1 runtime=node arch=x64 libc= platform=win32) @. build-release node-gyp rebuild --release gyp info it worked if it ends with ok gyp info using @.*** gyp info using @.*** | win32 | x64 gyp info find Python using Python version 3.11.5 found at "C:\Users\admin\AppData\Local\Programs\Python\Python311\python.exe" gyp ERR! find VS gyp ERR! find VS msvs_version not set from command line or npm config gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt gyp ERR! find VS unknown version "undefined" found at "C:\Program Files\Microsoft Visual Studio\2022\Community" gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use gyp ERR! find VS looking for Visual Studio 2015 gyp ERR! find VS - not found gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 gyp ERR! find VS gyp ERR! find VS ************************************************************** gyp ERR! find VS You need to install the latest version of Visual Studio gyp ERR! find VS including the "Desktop development with C++" workload. gyp ERR! find VS For more information consult the documentation at: gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows gyp ERR! find VS ************************************************************** gyp ERR! find VS gyp ERR! configure error gyp ERR! stack Error: Could not find any Visual Studio installation to use gyp ERR! stack at VisualStudioFinder.fail @.*** \add\node_modules\node-gyp\lib\find-visualstudio.js:121:47) gyp ERR! stack at maybeClose (node:internal/child_process:1091:16) gyp ERR! System Windows_NT 10.0.22621 gyp ERR! command "C:\Program Files\nodejs\node.exe" @.*** https://github.com/lerna\add\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release" gyp ERR! cwd C:\Work\medusa-strapi-repo\node_modules\better-sqlite3 — Reply to this email directly, view it on GitHub <#73 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXEQJHDUR3ZIAX4THQEUEHTYSI25VAVCNFSM6AAAAABCIZTNHWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRZG43DKMJTGE . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- This message (including any attachments) may contain confidential, proprietary, privileged and/or private information. The information is intended to be for the use of the individual or entity designated above. If you are not the intended recipient of this message, please notify the sender immediately, and delete the message and any attachments. Any disclosure, reproduction, distribution or other use of this message or any attachments by an individual or entity other than the intended recipient is prohibited.

@SGFGOV
Copy link
Owner

SGFGOV commented Feb 8, 2024

you need to build it in the root of the repo first time around

@ivanushkaPr
Copy link

Thank you. Its all builded correctly after that.

Copy link

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Feb 28, 2024
@bentron2000
Copy link

I am having the same issue on mac. Building from the root of the repo.

@github-actions github-actions bot removed the stale label Mar 22, 2024
@SGFGOV
Copy link
Owner

SGFGOV commented Mar 22, 2024 via email

@Camilo-Camargo
Copy link

Camilo-Camargo commented Mar 24, 2024

@bentron2000 I tested in MacBook Air m2, I used Python 3.10 via pyenv and Node version 18 using nvm, and works.

image

Copy link

github-actions bot commented Apr 7, 2024

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Apr 7, 2024
Copy link

github-actions bot commented May 5, 2024

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as completed May 5, 2024
@michsko544
Copy link

Same problem, I am unable to run this repo :(

Apple Mac M1 Pro
OS: macOS Sonoma 14.5
Python: 3.12.4
Node: 16.20

It would be great to have instructions on how to run this repo in docker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants