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

Fails on Windows (only) with ESMOKER_PACK "PackError: Package manager "npm" failed to pack" #355

Open
DavidAnson opened this issue Aug 31, 2023 · 0 comments

Comments

@DavidAnson
Copy link

For example: https://github.com/DavidAnson/markdownlint-cli2/actions/runs/6033354568

The same configuration passes on macOS and Ubuntu. See also #338.

Run npm exec --yes -- midnight-smoker --verbose test-invoke-as-cli
  npm exec --yes -- midnight-smoker --verbose test-invoke-as-cli
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
  
💨 midnight-smoker v7.0.1
- Packing current project…
✖ Failed while packing!

PackError: Package manager "npm" failed to pack
    at Npm7.pack (C:\npm\cache\_npx\b66bfc48521ee935\node_modules\midnight-smoker\src\pm\npm7.ts:180:13)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Smoker.pack (C:\npm\cache\_npx\b66bfc48521ee935\node_modules\midnight-smoker\src\smoker.ts:296:20)
    at Smoker.smoke (C:\npm\cache\_npx\b66bfc48521ee935\node_modules\midnight-smoker\src\smoker.ts:636:34)
    at Object.handler (C:\npm\cache\_npx\b66bfc48521ee935\node_modules\midnight-smoker\src\cli.ts:424:15) {
  code: 'ESMOKER_PACK',
  [cause]: {
    pm: 'npm',
    error: Error: Command failed with exit code 1: C:\hostedtoolcache\windows\node\20.5.1\x64\node.exe C:\npm\cache\_npx\b66bfc48521ee935\node_modules\.bin\corepack npm@9.8.1 pack --json --pack-destination=C:\Users\RUNNER~1\AppData\Local\Temp\midnight-smoker-W4Q28f --foreground-scripts=false
    C:\npm\cache\_npx\b66bfc48521ee935\node_modules\.bin\corepack:2
    basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
              ^^^^^^^
    
    SyntaxError: missing ) after argument list
        at internalCompileFunction (node:internal/vm:73:18)
        at wrapSafe (node:internal/modules/cjs/loader:1153:20)
        at Module._compile (node:internal/modules/cjs/loader:1197:27)
        at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
        at Module.load (node:internal/modules/cjs/loader:1091:32)
        at Module._load (node:internal/modules/cjs/loader:938:12)
        at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
        at node:internal/main/run_main_module:23:47
    
    Node.js v20.5.1
        at makeError (C:\npm\cache\_npx\b66bfc48521ee935\node_modules\execa\lib\error.js:60:11)
        at handlePromise (C:\npm\cache\_npx\b66bfc48521ee935\node_modules\execa\index.js:118:26)
        at processTicksAndRejections (node:internal/process/task_queues:95:5)
        at CorepackExecutor.exec (C:\npm\cache\_npx\b66bfc48521ee935\node_modules\midnight-smoker\src\pm\corepack.ts:50:12)
        at Npm7.pack (C:\npm\cache\_npx\b66bfc48521ee935\node_modules\midnight-smoker\src\pm\npm7.ts:156:20)
        at Smoker.pack (C:\npm\cache\_npx\b66bfc48521ee935\node_modules\midnight-smoker\src\smoker.ts:296:20)
        at Smoker.smoke (C:\npm\cache\_npx\b66bfc48521ee935\node_modules\midnight-smoker\src\smoker.ts:636:34)
        at Object.handler (C:\npm\cache\_npx\b66bfc48521ee935\node_modules\midnight-smoker\src\cli.ts:424:15) {
      shortMessage: 'Command failed with exit code 1: C:\\hostedtoolcache\\windows\\node\\20.5.1\\x64\\node.exe C:\\npm\\cache\\_npx\\b66bfc48521ee935\\node_modules\\.bin\\corepack npm@9.8.1 pack --json --pack-destination=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\midnight-smoker-W4Q28f --foreground-scripts=false',
      command: 'C:\\hostedtoolcache\\windows\\node\\20.5.1\\x64\\node.exe C:\\npm\\cache\\_npx\\b66bfc48521ee935\\node_modules\\.bin\\corepack npm@9.8.1 pack --json --pack-destination=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\midnight-smoker-W4Q28f --foreground-scripts=false',
      escapedCommand: '"C:\\hostedtoolcache\\windows\\node\\20.5.1\\x64\\node.exe" "C:\\npm\\cache\\_npx\\b66bfc48521ee935\\node_modules\\.bin\\corepack" "npm@9.8.1" pack --json "--pack-destination=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\midnight-smoker-W4Q28f" "--foreground-scripts=false"',
      exitCode: 1,
      signal: undefined,
      signalDescription: undefined,
      stdout: '',
      stderr: 'C:\\npm\\cache\\_npx\\b66bfc48521ee935\\node_modules\\.bin\\corepack:2\r\n' +
        `basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')")\r\n` +
        '          ^^^^^^^\r\n' +
        '\r\n' +
        'SyntaxError: missing ) after argument list\r\n' +
        '    at internalCompileFunction (node:internal/vm:73:18)\r\n' +
        '    at wrapSafe (node:internal/modules/cjs/loader:1153:20)\r\n' +
        '    at Module._compile (node:internal/modules/cjs/loader:1197:27)\r\n' +
        '    at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)\r\n' +
        '    at Module.load (node:internal/modules/cjs/loader:1091:32)\r\n' +
        '    at Module._load (node:internal/modules/cjs/loader:938:12)\r\n' +
        '    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)\r\n' +
        '    at node:internal/main/run_main_module:23:47\r\n' +
        '\r\n' +
        'Node.js v20.5.1',
      failed: true,
      timedOut: false,
      isCanceled: false,
      killed: false
    }
  }
}
Error: Process completed with exit code 1.
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