Closed antony closed 4 years ago
Weird one as it only just started to occur, but here's a minimal repro:
now.json
{ "version": 2, "name": "now-env-test", "build": { "env": { "NPM_TOKEN": "@npm-token", "NODE_ENV": "hello", "OTHER_VAR": "world" } }, "builds": [ { "src": "package.json", "use": "now-sapper" } ] }
package.json
{ "name": "now-env-test", "version": "1.0.0", "description": "fff", "main": "index.js", "scripts": { "build": "echo Build: $NODE_ENV $OTHER_VAR", "now-build": "echo Build: $NODE_ENV $OTHER_VAR" }, "author": "", "license": "ISC" }
index.js
module.exports = (req, res) => { res.end(`Hello from Node.js on Now 2.0!`); };
If you deploy this project, the build output is simply "world" instead of "hello world"
After working through the issue with Zeit - turns out it was https://github.com/zeit/now/pull/3862
Closing :tada:
Weird one as it only just started to occur, but here's a minimal repro:
now.json
package.json
index.js
If you deploy this project, the build output is simply "world" instead of "hello world"