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

The keyword 'package' is reserved during pm2 bundling #5672

Open
forgetso opened this issue Sep 6, 2023 · 0 comments
Open

The keyword 'package' is reserved during pm2 bundling #5672

forgetso opened this issue Sep 6, 2023 · 0 comments

Comments

@forgetso
Copy link

forgetso commented Sep 6, 2023

What's going wrong?

Cannot bundle pm2 due to reserved word package usage.

transforming (783) ../../node_modules/async/internal/withoutIndex.jsℹ Build end                                                                            config.vite.vite-plugin-close.js 14:45:17
SyntaxError: The keyword 'package' is reserved (21:2) in /home/user/coolProject/captcha/node_modules/pm2/lib/API/Modules/TAR.js
    at pp$4.raise (file:///home/user/coolProject/captcha/node_modules/rollup/dist/es/shared/node-entry.js:21539:13)
    at pp$5.checkUnreserved (file:///home/user/coolProject/captcha/node_modules/rollup/dist/es/shared/node-entry.js:21439:10)
    at pp$5.parsePropertyValue (file:///home/user/coolProject/captcha/node_modules/rollup/dist/es/shared/node-entry.js:21239:10)
    at pp$5.parseProperty (file:///home/user/coolProject/captcha/node_modules/rollup/dist/es/shared/node-entry.js:21198:8)
    at pp$5.parseObj (file:///home/user/coolProject/captcha/node_modules/rollup/dist/es/shared/node-entry.js:21153:21)
    at pp$5.parseExprAtom (file:///home/user/coolProject/captcha/node_modules/rollup/dist/es/shared/node-entry.js:20879:17)
    at pp$5.parseExprSubscripts (file:///home/user/coolProject/captcha/node_modules/rollup/dist/es/shared/node-entry.js:20687:19)
    at pp$5.parseMaybeUnary (file:///home/user/coolProject/captcha/node_modules/rollup/dist/es/shared/node-entry.js:20653:17)
    at pp$5.parseExprOps (file:///home/user/coolProject/captcha/node_modules/rollup/dist/es/shared/node-entry.js:20580:19)
    at pp$5.parseMaybeConditional (file:///home/user/coolProject/captcha/node_modules/rollup/dist/es/shared/node-entry.js:20563:19) {
  pos: 594,
  loc: {
    column: 2,
    file: '/home/user/coolProject/captcha/node_modules/pm2/lib/API/Modules/TAR.js',
    line: 21
  },
  raisedAt: 603,
  frame: '19:   start,\n20:   publish,\n21:   package\n      ^\n22: }',
  id: '/home/user/coolProject/captcha/node_modules/pm2/lib/API/pm2-plus/helpers.js',
  hook: 'resolveId',
  code: 'PLUGIN_ERROR',
  plugin: 'commonjs--resolver',

How could we reproduce this issue?

See reproduction here: https://stackblitz.com/edit/vitejs-vite-j8m8m3

Supporting information

                        -------------

__/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
 _\/\\\/////////\\\_\/\\\\\\________/\\\\\\__/\\\///////\\\___
  _\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\__
   _\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/___
    _\/\\\/////////____\/\\\__\///\\\/___\/\\\________/\\\//_____
     _\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//________
      _\/\\\_____________\/\\\_____________\/\\\___/\\\/___________
       _\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\_
        _\///______________\///______________\///__\///////////////__


                          Runtime Edition

        PM2 is a Production Process Manager for Node.js applications
                     with a built-in Load Balancer.

                Start and Daemonize any application:
                $ pm2 start app.js

                Load Balance 4 instances of api.js:
                $ pm2 start api.js -i 4

                Monitor in production:
                $ pm2 monitor

                Make pm2 auto-boot at server restart:
                $ pm2 startup

                To go further checkout:
                http://pm2.io/


                        -------------

[PM2] Spawning PM2 daemon with pm2_home=/home/user/.pm2
[PM2] PM2 Successfully daemonized

--- PM2 report ----------------------------------------------------------------
Date                 : Wed Sep 06 2023 14:47:43 GMT+0100 (British Summer Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version         : 5.3.0
node version         : 18.14.2
node path            : /home/user/.nvm/versions/node/v18.14.2/bin/npx
argv                 : /home/user/.nvm/versions/node/v18.14.2/bin/node,/home/user/dev/prosopo/captcha/node_modules/pm2/lib/Daemon.js
argv0                : node
user                 : chris
uid                  : 1000
gid                  : 1000
uptime               : 0min
===============================================================================
--- CLI ----------------------------------------------------
local pm2            : 5.3.0
node version         : 18.14.2
node path            : /home/user/.nvm/versions/node/v18.14.2/bin/npx
argv                 : /home/user/.nvm/versions/node/v18.14.2/bin/node,/home/user/dev/prosopo/captcha/node_modules/.bin/pm2,report
argv0                : node
user                 : user
uid                  : 1000
gid                  : 1000
===============================================================================
--- System info --------------------------------------------
arch                 : x64
platform             : linux
type                 : Linux
cpus                 : AMD FX(tm)-8350 Eight-Core Processor
cpus nb              : 8
freemem              : 8519884800
totalmem             : 33622290432
home                 : /home/user
===============================================================================
--- PM2 list -----------------------------------------------
┌────┬───────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name      │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
└────┴───────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
===============================================================================
--- Daemon logs --------------------------------------------
/home/user/.pm2/pm2.log last 20 lines:
PM2        | 2023-09-06T14:47:43: PM2 log: ===============================================================================
PM2        | 2023-09-06T14:47:43: PM2 log: --- New PM2 Daemon started ----------------------------------------------------
PM2        | 2023-09-06T14:47:43: PM2 log: Time                 : Wed Sep 06 2023 14:47:43 GMT+0100 (British Summer Time)
PM2        | 2023-09-06T14:47:43: PM2 log: PM2 version          : 5.3.0
PM2        | 2023-09-06T14:47:43: PM2 log: Node.js version      : 18.14.2
PM2        | 2023-09-06T14:47:43: PM2 log: Current arch         : x64
PM2        | 2023-09-06T14:47:43: PM2 log: PM2 home             : /home/user/.pm2
PM2        | 2023-09-06T14:47:43: PM2 log: PM2 PID file         : /home/user/.pm2/pm2.pid
PM2        | 2023-09-06T14:47:43: PM2 log: RPC socket file      : /home/user/.pm2/rpc.sock
PM2        | 2023-09-06T14:47:43: PM2 log: BUS socket file      : /home/user/.pm2/pub.sock
PM2        | 2023-09-06T14:47:43: PM2 log: Application log path : /home/user/.pm2/logs
PM2        | 2023-09-06T14:47:43: PM2 log: Worker Interval      : 30000
PM2        | 2023-09-06T14:47:43: PM2 log: Process dump file    : /home/user/.pm2/dump.pm2
PM2        | 2023-09-06T14:47:43: PM2 log: Concurrent actions   : 2
PM2        | 2023-09-06T14:47:43: PM2 log: SIGTERM timeout      : 1600
PM2        | 2023-09-06T14:47:43: PM2 log: ===============================================================================

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

1 participant