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

yarn build on windows give a lot of ERR and not spitting out the static pages under /out folder #504

Open
1 task done
wliew99 opened this issue Apr 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@wliew99
Copy link

wliew99 commented Apr 12, 2024

Have you read the Contributing Guidelines on issues?

Description

Unable to yarn build on windows to get the staic pages generated under /out folder.
Running the same codebase in macOS and github action with ubuntu works.

Steps to reproduce

rm -rf node_modules
rm .eventcatalog-core
yarn -> works

yarn build gives the following a lot of errors and did not spit out the /out folder for static pages

and if you run yarn build again, you will get this

@eventcatalog/core@1.2.5 scripts:move-schema-for-download
node scripts/move-schemas-for-download.js

@eventcatalog/core@1.2.5 build
next build && next export

node:internal/modules/cjs/loader:1080
throw err;
^

Error: Cannot find module 'C:\Users\myname\next\dist\bin\next'
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at Module._load (node:internal/modules/cjs/loader:922:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
at node:internal/main/run_main_module:23:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}

Expected behavior

yarn install
yarn build should generate /out folder under root
then we can deploy locally on windows to publish static pages

Actual behavior

yarn build gives this error very long
...
[4/4] Building fresh packages...
[8/10] ⠂ tree-sitter-json
[-/10] ⠄ waiting...
[10/10] ⠄ tree-sitter-yaml
[4/10] ⠄ esbuild
warning Error running install script for optional dependency: "C:\Users\myname\eventcatalog\node_modules\tree-sitter-yaml: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: C:\Users\myname\eventcatalog\node_modules\tree-sitter-yaml
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@10.1.0
gyp info using node@18.18.0 | win32 | x64
gyp info find Python using Python version 3.12.2 found at "C:\Users\myname\AppData\Local\Programs\Python\Python312\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 could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details.
gyp ERR! find VS
gyp ERR! find VS Failure details: undefined
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details.
gyp ERR! find VS
gyp ERR! find VS Failure details: undefined
...
yp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack at VisualStudioFinder.fail (C:\Users\myname\AppData\Local\Yarn\Data\global\node_modules\node-gyp\lib\find-visualstudio.js:116:11)
gyp ERR! stack at VisualStudioFinder.findVisualStudio (C:\Users\myname\AppData\Local\Yarn\Data\global\node_modules\node-gyp\lib\find-visualstudio.js:72:17)
gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
gyp ERR! stack at async createBuildDir (C:\Users\myname\AppData\Local\Yarn\Data\global\node_modules\node-gyp\lib\configure.js:95:26)
gyp ERR! stack at async run (C:\Users\myname\AppData\Local\Yarn\Data\global\node_modules\node-gyp\bin\node-gyp.js:81:18)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\myname\\AppData\\Local\\Yarn\\Data\\global\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\myname\eventcatalog\node_modules\tree-sitter
Done in 168.79s.

Your environment

Using @eventcatalog/core": "1.2.5"
$ node -v => v18.18.0
$ yarn -v => 1.22.22
Using bash shell on windows 10 Pro (19045.4170) inside VSC v1.88.0

@wliew99 wliew99 added the bug Something isn't working label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant