cc vmaster
cc vmaster

Reputation: 1

pkg package failed after upgrade puppeteer version from 1.20.0 to 24.0.0

Build command:

"scripts": {
    "pre_build_andata": "rm -rf build",
    "_build_andata": "pkg src/startup.js --targets node18-macos-arm64 --output build/andata-helper"
}

Build failed after upgrade puppeteer version to 24.0.0, build log as follow:

npm run _build_andata
pre_build_andata
rm -rf build

_build_andata
pkg src/startup.js --targets node18-macos-arm64 --output build/andata-helper

[email protected]
(node:49060) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Warning Babel parse has failed: Unexpected token, expected "from" (1:12)
Warning Failed to make bytecode node18-arm64 for file /snapshot/puppeteer-projects/node_modules/typed-query-selector/shim.d.ts

There is no effect after config pkg scripts and assets option:

"assets": [
  "*"
],
"scripts": [
  "node_modules/puppeteer/lib/*.js",
  "!node_modules/**/*.d.ts",
  "!../node_modules/**/*.d.ts"
]

How to package my puppeteer in version 24.0.0 ?

It works fine at version 1.20.0, after upgrade to 24.0.0, package failed. And there is no effect to config pkg option scripts and assets.

Upvotes: 0

Views: 15

Answers (0)

Related Questions