$ npx -qp [email protected] -c 'npm run'
start:webpack-dev-server --open
build:NODE_ENV=production webpack -p
$ npx -qp [email protected] -c 'npm run'
npm timing config:load:defaults Completed in 1ms
...
npm timing npm:load Completed in 25ms
npm run-script <command> [-- <args>]
aliases: run, rum, urn
npm timing npm Completed in 155ms
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ahu/.npm/_logs/2020-08-23T00_18_04_815Z-debug.log
$ npx -qp [email protected] -c 'npm run'
start:webpack-dev-server --open
build:NODE_ENV=production webpack -p
npx -qp [email protected] -c 'npm run'
Akar penyebab: https://github.com/npm/config/issues/2
Kita harus melewatkan nilai env ''
daripada meletakkannya di objek konfigurasi.
Bukankah string kosong berbeda dari tidak disetel?
Ya, tapi sayangnya npm 6 tidak menghormati perbedaan ini dengan tepat.
Diperbaiki dalam versi beta terbaru.