pkg icon indicating copy to clipboard operation
pkg copied to clipboard

Cannot find module 'fp-ts/Either'

Open alexn-s opened this issue 3 years ago • 1 comments

What version of pkg are you using?

5.7.0

What version of Node.js are you using?

v16.3.0

What operating system are you using?

Microsoft Windows 11 Home

What CPU architecture are you using?

AMD Ryzen 5 4600H

What Node versions, OSs and CPU architectures are you building for?

node16-win

Describe the Bug

Building with fp-ts results in an error at runtime

see closed issue: https://github.com/vercel/pkg/issues/1123

issues-triaging > .\.exes\main.exe
pkg/prelude/bootstrap.js:1876
      throw error;
      ^

Error: Cannot find module 'fp-ts/Either'
Require stack:
- C:\snapshot\issues-triaging\dist\main.js
1) If you want to compile the package/file into executable, please pay attention to compilation warnings and specify a literal in 'require' call. 2) If you don't want to compile the package/file into executable and want to 'require' it from filesystem (likely plugin), specify an absolute path in 'require' call using process.cwd() or process.execPath.
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function._resolveFilename (pkg/prelude/bootstrap.js:1955:46)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at Module.require (pkg/prelude/bootstrap.js:1855:31)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\snapshot\issues-triaging\dist\main.js:4:9)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Module._compile (pkg/prelude/bootstrap.js:1937:32)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ 'C:\\snapshot\\issues-triaging\\dist\\main.js' ],
  pkg: true
}

Expected Behavior

issues-triaging > node .\dist\main.js
start


right:  { _tag: 'Right', right: 'heureka' }
left:  { _tag: 'Right', right: 'heureka' }


end

To Reproduce

see repo https://github.com/alexn-s/pkg-fp-ts-error and run npm run default

alexn-s avatar Jun 26 '22 08:06 alexn-s

+1!, Getting same error, but for node:stream package. This occurs randomly on some machine and works right on some.

hnanacc avatar Aug 26 '22 20:08 hnanacc

This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

github-actions[bot] avatar Nov 25 '22 00:11 github-actions[bot]

This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit.

github-actions[bot] avatar Nov 30 '22 00:11 github-actions[bot]