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

Using issue on mac 15.0 (24A335) with node 20 #96

Closed
alberttwong opened this issue Sep 30, 2024 · 1 comment
Closed

Using issue on mac 15.0 (24A335) with node 20 #96

alberttwong opened this issue Sep 30, 2024 · 1 comment

Comments

@alberttwong
Copy link

What version of pkg are you using?

5.15.0

What version of Node.js are you using?

v20.17.0

What operating system are you using?

macos

What CPU architecture are you using?

arm64

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

node20-macos-arm64

Describe the Bug

% pkg .
> [email protected]
> Targets not specified. Assuming:
  node20-linux-arm64, node20-macos-arm64, node20-win-arm64
> Fetching base Node.js binaries to PKG_CACHE_PATH
  fetched-v20.17.0-linux-arm64        [====================] 100%

  fetched-v20.17.0-macos-arm64        [====================] 100%

  fetched-v20.17.0-win-arm64          [====================] 100%

> Warning Babel parse has failed: 'await' is only allowed within async functions and at the top levels of modules. (24:0)
> Warning Babel parse has failed: Unexpected character '�'. (1:0)
> Warning Failed to make bytecode node20-arm64 for file /snapshot/license-plates/cli.js
> Warning Failed to make bytecode node20-arm64 for file /snapshot/license-plates/node_modules/chalk/source/index.js
> Warning Failed to make bytecode node20-arm64 for file /snapshot/license-plates/node_modules/chalk/source/utilities.js
> Warning Failed to make bytecode node20-arm64 for file /snapshot/license-plates/node_modules/playwright-core/lib/server/chromium/appIcon.png
> Warning Failed to make bytecode node20-arm64 for file /snapshot/license-plates/cli.js
> Warning Failed to make bytecode node20-arm64 for file /snapshot/license-plates/node_modules/chalk/source/index.js
> Warning Failed to make bytecode node20-arm64 for file /snapshot/license-plates/node_modules/chalk/source/utilities.js
> Warning Failed to make bytecode node20-arm64 for file /snapshot/license-plates/node_modules/playwright-core/lib/server/chromium/appIcon.png
> Warning Failed to make bytecode node20-arm64 for file C:\snapshot\license-plates\cli.js
> Warning Failed to make bytecode node20-arm64 for file C:\snapshot\license-plates\node_modules\chalk\source\index.js
> Warning Failed to make bytecode node20-arm64 for file C:\snapshot\license-plates\node_modules\chalk\source\utilities.js
> Warning Failed to make bytecode node20-arm64 for file C:\snapshot\license-plates\node_modules\playwright-core\lib\server\chromium\appIcon.png
% ls
README.md				license-plates-win.exe	index.js				package-lock.json
license-plates-linux		cli.js					lib					package.json
license-plates-macos		example.js				node_modules
% ./license-plates-macos
node:internal/modules/cjs/loader:1228
  throw err;
  ^

Error: Cannot find module '/snapshot/license-plates/cli.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Function._resolveFilename (pkg/prelude/bootstrap.js:1955:46)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Function.runMain (pkg/prelude/bootstrap.js:1983:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.17.0

Expected Behavior

I was expecting it to create the binary

To Reproduce

I could give you access to the repo if requested.

@robertsLando
Copy link
Member

Checking the error seems you are using a top level await in your code that is not working due to #16

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

No branches or pull requests

2 participants