search

Home  >  Q&A  >  body text

node.js - cross-env的作用是什么?

使用cross-env解决跨平台设置NODE_ENV的问题

问题:是从哪个平台跨到哪个平台?

伊谢尔伦伊谢尔伦2863 days ago810

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 16:14:15

    Most Windows command prompts will choke when you set environment variables with NODE_ENV=production like that. (The exception is Bash on Windows, which uses native Bash.) Similarly, there's a difference in how windows and POSIX commands utilize environment variables. With POSIX, you use: $ENV_VAR and on windows you use %ENV_VAR%.

    It’s quite clear here that there are differences in setting environment variables on different platforms (Win, POSIX).

    reply
    0
  • Cancelreply