Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

MODULE_NOT_FOUND when running project builds in Git Bash on Windows #211

Open
7 of 11 tasks
jhdcruz opened this issue Nov 20, 2023 · 1 comment
Open
7 of 11 tasks

Comments

@jhdcruz
Copy link

jhdcruz commented Nov 20, 2023

Is there an existing issue for this?

SDK Version

1.2.6

What environment is your node script running in?

  • Personal Computer

Are you using an alpine based docker image?

  • Yes (please specify the version)
  • No (please describe your environment)

Does the failure occur on a remote environment only?

  • Yes (please describe your environment)
  • No (please describe your local environment)

Are you using alpine based node docker image. If so, what version are you using? e.g node:16-alpine3.12

No response

If you are using alpine, have you tried using latest version of alpine or (currently alpine3.16 or alpine3.17)?

  • Yes (please specify the version)"
  • No, and I cannot upgrade

Have you tried using the latest minor version of node (currently 16.20 or 18.15)?

  • Yes (please specify the version)
  • No, and I cannot upgrade

If you run npm install --verbose --foreground-scripts @sentry/profiling-node in an empty directory, what is the output?

I use pnpm as package manager, I don't know the script's equivalent, so I just ran the exact script using npm.

$ npm install --verbose --foreground-scripts @sentry/profiling-node
npm verb cli C:\Users\Admin\AppData\Local\fnm_multishells\13260_1700500628488\node.exe C:\Users\Admin\AppData\Local\fnm_multishells\13260_1700500628488\node_modules\npm\bin\npm-cli.js
npm info using [email protected]
npm info using [email protected]
npm verb title npm install @sentry/profiling-node
npm verb argv "install" "--loglevel" "verbose" "--foreground-scripts" "@sentry/profiling-node"
npm verb logfile logs-max:10 dir:C:\Users\Admin\AppData\Local\npm-cache\_logs\2023-11-20T17_17_23_143Z-
npm verb logfile C:\Users\Admin\AppData\Local\npm-cache\_logs\2023-11-20T17_17_23_143Z-debug-0.log
npm http fetch GET 200 https://registry.npmjs.org/@sentry%2fprofiling-node 2549ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/detect-libc 455ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/node-abi 531ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@sentry%2fhub 706ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@sentry%2ftypes 798ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/node-gyp 1365ms (cache updated)
npm http fetch GET 200 https://registry.npmjs.org/@sentry%2futils 2210ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@sentry%2fcore 2462ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@sentry%2fnode 2641ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/https-proxy-agent 726ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/semver 718ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/npmlog 714ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/exponential-backoff 726ms (cache updated)
npm http fetch GET 200 https://registry.npmjs.org/env-paths 768ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/make-fetch-happen 877ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/glob 913ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/nopt 957ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/graceful-fs 965ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/which 958ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/tar 965ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/rimraf 1001ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@sentry-internal%2ftracing 1699ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/agent-base 261ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/debug 265ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/ms 170ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/lru-cache 178ms (cache updated)
npm http fetch GET 200 https://registry.npmjs.org/inherits 1214ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/once 1248ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minimatch 1253ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/is-lambda 1251ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/agentkeepalive 1258ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/path-is-absolute 1269ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/inflight 1276ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/http-cache-semantics 1268ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/http-proxy-agent 1273ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minipass 1282ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minipass-fetch 1302ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/cacache 1391ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/yallist 1510ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minipass-pipeline 1540ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/negotiator 1542ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/promise-retry 1544ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minipass 1526ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/socks-proxy-agent 1552ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/console-control-strings 1545ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/ssri 1557ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minipass-flush 1566ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/abbrev 1558ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/set-blocking 1553ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/fs-minipass 1549ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minizlib 1559ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/gauge 1575ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/mkdirp 1569ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/fs.realpath 1645ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/chownr 1610ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/isexe 1609ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/are-we-there-yet 1783ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minipass-collect 1897ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/wrappy 933ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/brace-expansion 957ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/p-map 634ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/minipass-sized 683ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/promise-inflight 713ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/humanize-ms 730ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@npmcli%2fmove-file 726ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/encoding 694ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@npmcli%2ffs 742ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@tootallnate%2fonce 734ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/unique-filename 803ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/infer-owner 821ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/err-code 829ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/socks 827ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/retry 1388ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/aggregate-error 217ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/@gar%2fpromisify 282ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/unique-slug 255ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/concat-map 184ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/balanced-match 214ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/iconv-lite 174ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/safer-buffer 162ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/color-support 266ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/delegates 279ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/has-unicode 272ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/string-width 323ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/aproba 333ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/readable-stream 363ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/strip-ansi 360ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/signal-exit 366ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/wide-align 365ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/util-deprecate 227ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/string_decoder 236ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/emoji-regex 178ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/ansi-regex 226ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/is-fullwidth-code-point 246ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/indent-string 163ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/clean-stack 169ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/safe-buffer 176ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/smart-buffer 227ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/ip 244ms (cache revalidated)
npm http fetch GET 200 https://registry.npmjs.org/imurmurhash 201ms (cache revalidated)
npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm http fetch GET 200 https://registry.npmjs.org/node-abi/-/node-abi-3.51.0.tgz 3172ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@sentry/hub/-/hub-7.81.0.tgz 3622ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@sentry/profiling-node/-/profiling-node-1.2.6.tgz 11198ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@sentry/types/-/types-7.81.0.tgz 11564ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@sentry/node/-/node-7.81.0.tgz 13489ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.81.0.tgz 13495ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@sentry/core/-/core-7.81.0.tgz 13599ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@sentry/utils/-/utils-7.81.0.tgz 13806ms (cache miss)
npm info run @sentry/[email protected] install node_modules/@sentry/profiling-node node scripts/check-build.mjs

> @sentry/[email protected] install
> node scripts/check-build.mjs

@sentry/profiling-node: No precompiled binary foundn @sentry/[email protected] install node_modules/@sentry/profilin
@sentry/profiling-node: Compiling from source...
[##################] / reify:@sentry/utils: info run @sentry/[email protected] install node_modules/@sentry/profilin
> @sentry/[email protected] build:configure
> node-gyp configure

@sentry/profiling-node: Failed to configure gypo run @sentry/[email protected] install node_modules/@sentry/profilin
@sentry/profiling-node: npm verb cli C:\Users\Admin\AppData\Local\fnm_multishells\13260_1700500628488\node.exe C:\Users\Admin\AppData\Local\fnm_multishells\13260_1700500628488\node_modules\npm\bin\npm-cli.js
npm info using [email protected]
npm info using [email protected]
npm verb title npm prefix
npm verb argv "prefix" "--global"
npm verb logfile logs-max:10 dir:C:\Users\Admin\AppData\Local\npm-cache\_logs\2023-11-20T17_18_00_642Z-
npm verb logfile C:\Users\Admin\AppData\Local\npm-cache\_logs\2023-11-20T17_18_00_642Z-debug-0.log
npm verb exit 0
npm info ok
npm verb cli C:\Users\Admin\AppData\Local\fnm_multishells\13260_1700500628488\node.exe C:\Users\Admin\AppData\Local\fnm_multishells\13260_1700500628488\node_modules\npm\bin\npm-cli.js
npm info using [email protected]
npm info using [email protected]
npm verb title npm run build:configure
npm verb argv "run" "build:configure"
npm verb logfile logs-max:10 dir:C:\Users\Admin\AppData\Local\npm-cache\_logs\2023-11-20T17_18_02_155Z-
npm verb logfile C:\Users\Admin\AppData\Local\npm-cache\_logs\2023-11-20T17_18_02_155Z-debug-0.log
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   'C:\\Users\\Admin\\AppData\\Local\\fnm_multishells\\13260_1700500628488\\node.exe',
gyp verb cli   'C:\\Users\\Admin\\test\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'configure'
gyp verb cli ]
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp verb command configure []
gyp verb find Python Python is not set from command line or npm configuration
gyp verb find Python Python is not set from environment variable PYTHON
gyp verb find Python checking if "python3" can be used
gyp verb find Python - executing "python3" to get executable path
gyp verb find Python - "python3" is not in PATH or produced an error
gyp verb find Python checking if "python" can be used
gyp verb find Python - executing "python" to get executable path
gyp verb find Python - executable path is "C:\Users\Admin\AppData\Local\Programs\Python\Python312\python.exe"
gyp verb find Python - executing "C:\Users\Admin\AppData\Local\Programs\Python\Python312\python.exe" to get version
gyp verb find Python - version is "3.12.0"
gyp info find Python using Python version 3.12.0 found at "C:\Users\Admin\AppData\Local\Programs\Python\Python312\python.exe"
gyp verb get node dir no --target version specified, falling back to host node version: 21.0.0
gyp verb command install [ '21.0.0' ]
gyp verb install input version string "21.0.0"
gyp verb install installing version: 21.0.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 11
gyp verb needs "installVersion" 11
gyp verb install version is good
gyp verb on Windows; need to check node.lib
gyp verb get node dir target node version installed: 21.0.0
gyp verb build dir attempting to create "build" dir: C:\Users\Admin\test\node_modules\@sentry\profiling-node\build
gyp verb build dir "build" dir needed to be created? Yes
gyp verb find VS msvs_version not set from command line or npm config
gyp verb find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp verb find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
gyp verb find VS not looking for VS2015 as it is only supported up to Node.js 18
gyp verb find VS not looking for VS2013 as it is only supported up to Node.js 8
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 not looking for VS2015 as it is only supported up to Node.js 18
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:\Users\Admin\test\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
gyp ERR! stack     at C:\Users\Admin\test\node_modules\node-gyp\lib\find-visualstudio.js:75:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\Admin\test\node_modules\node-gyp\lib\find-visualstudio.js:380:14)
gyp ERR! stack     at C:\Users\Admin\test\node_modules\node-gyp\lib\find-visualstudio.js:71:14
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2015 (C:\Users\Admin\test\node_modules\node-gyp\lib\find-visualstudio.js:364:14)
gyp ERR! stack     at C:\Users\Admin\test\node_modules\node-gyp\lib\find-visualstudio.js:67:12
gyp ERR! stack     at failPowershell (C:\Users\Admin\test\node_modules\node-gyp\lib\find-visualstudio.js:156:7)
gyp ERR! stack     at VisualStudioFinder.parseData (C:\Users\Admin\test\node_modules\node-gyp\lib\find-visualstudio.js:170:14)
gyp ERR! stack     at C:\Users\Admin\test\node_modules\node-gyp\lib\find-visualstudio.js:143:14
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:414:7)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "C:\\Users\\Admin\\AppData\\Local\\fnm_multishells\\13260_1700500628488\\node.exe" "C:\\Users\\Admin\\test\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure"
gyp ERR! cwd C:\Users\Admin\test\node_modules\@sentry\profiling-node
gyp ERR! node -v v21.0.0
gyp ERR! node-gyp -v v9.4.1
gyp ERR! not ok
npm verb exit 1
npm verb code 1
npm info run @sentry/[email protected] install { code: 0, signal: null }

added 104 packages in 1m

5 packages are looking for funding
  run `npm fund` for details
npm verb exit 0
npm info ok

Crash report

pnpm build / turbo build result:

{{project}}:build: cache miss, executing c6c20dc3ab5c90c6
{{project}}:build: 
{{project}}:build: > {{project}}@ build D:\Code\{{project_dir}}\apps\admin
{{project}}:build: > next build
{{project}}:build: 
{{project}}:build:    ▲ Next.js 14.0.2
{{project}}:build:    - Environments: .env.local
{{project}}:build: 
{{project}}:build:    Creating an optimized production build ...
{{project}}:build: (node:11176) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
{{project}}:build: (Use `node --trace-deprecation ...` to show where the warning was created)
{{project}}:build:  ✓ Compiled successfully
{{project}}:build:    Linting and checking validity of types ...
{{project}}:build:    Collecting page data ...
{{project}}:build: Error: Cannot find module 'D:\Code\{{project_dir}}\node_modules\.pnpm\@[email protected]\node_modules\@sentry\profiling-node\lib\sen
try_cpu_profiler-win32-x64-120.node'
{{project}}:build: Require stack:
{{project}}:build: - D:\Code\{{project_dir}}\node_modules\.pnpm\@[email protected]\node_modules\@sentry\profiling-node\lib\index.js
{{project}}:build: - D:\Code\{{project_dir}}\apps\admin\.next\server\app\(login)\auth\route.js
{{project}}:build: - D:\Code\{{project_dir}}\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\server\require.js
{{project}}:build: - D:\Code\{{project_dir}}\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\server\load-components.js
{{project}}:build: - D:\Code\{{project_dir}}\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\build\utils.js
{{project}}:build: - D:\Code\{{project_dir}}\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\build\worker.js
{{project}}:build: - D:\Code\{{project_dir}}\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\compiled\jest-worker\processChil
d.js
{{project}}:build:     at Module._resolveFilename (node:internal/modules/cjs/loader:1138:15)
{{project}}:build:     at D:\Code\{{project_dir}}\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\server\require-hook.js:54:3
6
{{project}}:build:     at Module._load (node:internal/modules/cjs/loader:979:27)
{{project}}:build:     at Module.require (node:internal/modules/cjs/loader:1229:19)
{{project}}:build:     at mod.require (D:\Code\{{project_dir}}\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\server\require
-hook.js:64:28)
{{project}}:build:     at require (node:internal/modules/helpers:177:18)
{{project}}:build:     at importCppBindingsModule (D:\Code\{{project_dir}}\node_modules\.pnpm\@[email protected]\node_modules\@sentry\profiling-node\li
b\index.js:18458:10)
{{project}}:build:     at Object.<anonymous> (D:\Code\{{project_dir}}\node_modules\.pnpm\@[email protected]\node_modules\@sentry\profiling-node\lib\ind
ex.js:18460:34)
{{project}}:build:     at Module._compile (node:internal/modules/cjs/loader:1369:14)
{{project}}:build:     at Module._extensions..js (node:internal/modules/cjs/loader:1427:10) {
{{project}}:build:   code: 'MODULE_NOT_FOUND',
{{project}}:build:   requireStack: [
{{project}}:build:     'D:\\Code\\{{project_dir}}\\node_modules\\.pnpm\\@[email protected]\\node_modules\\@sentry\\profiling-node\\lib\\index.js',     
{{project}}:build:     'D:\\Code\\{{project_dir}}\\apps\\admin\\.next\\server\\app\\(login)\\auth\\route.js',
{{project}}:build:     'D:\\Code\\{{project_dir}}\\node_modules\\.pnpm\\[email protected][email protected][email protected]\\node_modules\\next\\dist\\server\\require.js',
{{project}}:build:     'D:\\Code\\{{project_dir}}\\node_modules\\.pnpm\\[email protected][email protected][email protected]\\node_modules\\next\\dist\\server\\load-compone
nts.js',
{{project}}:build:     'D:\\Code\\{{project_dir}}\\node_modules\\.pnpm\\[email protected][email protected][email protected]\\node_modules\\next\\dist\\build\\utils.js',   
{{project}}:build:     'D:\\Code\\{{project_dir}}\\node_modules\\.pnpm\\[email protected][email protected][email protected]\\node_modules\\next\\dist\\build\\worker.js',  
{{project}}:build:     'D:\\Code\\{{project_dir}}\\node_modules\\.pnpm\\[email protected][email protected][email protected]\\node_modules\\next\\dist\\compiled\\jest-worke
r\\processChild.js'
{{project}}:build:   ]
{{project}}:build: }
{{project}}:build: 
{{project}}:build: > Build error occurred
{{project}}:build: Error: Failed to collect page data for /auth
{{project}}:build:     at D:\Code\{{project_dir}}\node_modules\.pnpm\[email protected][email protected][email protected]\node_modules\next\dist\build\utils.js:1217:15     
{{project}}:build:     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
{{project}}:build:   type: 'Error'
{{project}}:build: }
{{project}}:build:  ELIFECYCLE  Command failed with exit code 1.
{{project}}:build: ERROR: command finished with error: command (D:\Code\{{project_dir}}\apps\admin) pnpm run build exited (1)
{{project}}#build: command (D:\Code\{{project_dir}}\apps\admin) pnpm run build exited (1)

Already did https://github.com/getsentry/profiling-node?tab=readme-ov-file#bundling

Running builds in Linux works fine, as well as vercel and CI builds. Just except Windows.

@jhdcruz jhdcruz changed the title MODULE_NOT_FOUND when building on Windows 10 MODULE_NOT_FOUND when building on Windows 10 - Else builds successfully Nov 20, 2023
@jhdcruz jhdcruz changed the title MODULE_NOT_FOUND when building on Windows 10 - Else builds successfully MODULE_NOT_FOUND when building on Windows 10 - Others builds successfully Nov 20, 2023
@jhdcruz jhdcruz changed the title MODULE_NOT_FOUND when building on Windows 10 - Others builds successfully MODULE_NOT_FOUND when running project builds on Windows 10 - Others builds successfully Nov 20, 2023
@jhdcruz
Copy link
Author

jhdcruz commented Nov 24, 2023

Found out the cause.

Apparently it does not build properly when running builds in Git Bash in MinTTY config.
cmd and powershell builds just fine.

@jhdcruz jhdcruz changed the title MODULE_NOT_FOUND when running project builds on Windows 10 - Others builds successfully MODULE_NOT_FOUND when running project builds in Git Bash on Windows Nov 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant