expo / snack

Expo Snack lets you run Expo in the browser.
https://snack.expo.dev
MIT License
347 stars 96 forks source link

Snackager does not support npm 9 and above. #561

Open zhiqingchen opened 4 months ago

zhiqingchen commented 4 months ago

Summary

https://github.blog/changelog/2022-10-24-npm-v9-0-0-released/

npm bin has been removed (use npx or npm exec to execute binaries)

Error: npm bin exited with non-zero code: 1
    at ChildProcess.completionListener (/Users/zhiqingchen/ajk/snack/snackager/node_modules/@expo/spawn-async/src/spawnAsync.ts:67:13)
    at Object.onceWrapper (node:events:633:26)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1105:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:305:5)
    ...
    at spawnAsync (/Users/zhiqingchen/ajk/snack/snackager/node_modules/@expo/spawn-async/src/spawnAsync.ts:28:21)
    at spawnSafeAsync (/Users/zhiqingchen/ajk/snack/snackager/src/utils/installDependencies.ts:27:20)
    at getYarnPackagerAsync (/Users/zhiqingchen/ajk/snack/snackager/src/utils/installDependencies.ts:42:30)
    at installPackage (/Users/zhiqingchen/ajk/snack/snackager/src/utils/installPackage.ts:52:42)
    at main (/Users/zhiqingchen/ajk/snack/snackager/src/cli.ts:61:3) {
  pid: 66462,
  output: [
    'Unknown command: "bin"\n' +
      '\n' +
      'To see a list of supported npm commands, run:\n' +
      '  npm help\n',
    ''
  ],
  stdout: 'Unknown command: "bin"\n' +
    '\n' +
    'To see a list of supported npm commands, run:\n' +
    '  npm help\n',
  stderr: '',
  status: 1,
  signal: null
}

What platform(s) does this occur on?

Web

SDK Version

50

Reproducible demo or steps to reproduce from a blank project

yarn bundle react-native-elements | ./node_modules/.bin/bunyan