question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`now dev` rebuilding lambda on browser refresh

See original GitHub issue

This is happening in the svelte-function project in now-example repo without any file changes.

Refreshing the browser does rebuild the lambdas every time even if there is no changes.

Console output:

> Now CLI 16.1.2 dev (beta) β€” https://zeit.co/feedback/dev
> Creating initial build
> Success! Build completed

 LOGS 

> Ready! Available at http://localhost:3000
rollup v1.20.0
bundles src/main.js β†’ public/bundle.js...
LiveReload enabled
created public/bundle.js in 186ms
> Building @now/static-build@latest:package.json
Downloading user files...
Detected Svelte framework. Optimizing your deployment...
Svelte does not require a specific Node.js version. Continuing ...
installing to /Users/Projects/now-examples/svelte-functions
npm WARN svelte-app@1.0.0 No repository field.
npm WARN svelte-app@1.0.0 No license field.

audited 2281 packages in 1.466s
found 0 vulnerabilities

`dev` server already running for "package.json"
> Built @now/static-build@latest:package.json [2s]

/// === Initial load === ///

> GET /
  [23:13:58] 200 ─ 5.00ms ─ /
> GET /global.css
> GET /bundle.css
> GET /bundle.js
  [23:13:59] 200 ─ 0.39ms ─ /global.css
  [23:13:59] 200 ─ 0.91ms ─ /bundle.css
  [23:13:59] 200 ─ 1.86ms ─ /bundle.js
> GET /bundle.css.map
> GET /api/date
> Building @now/node@latest:api/date.js
> GET /bundle.js.map
  [23:13:59] 200 ─ 0.52ms ─ /bundle.css.map
  [23:13:59] 200 ─ 0.91ms ─ /bundle.js.map
downloading user files...
download complete [1ms]
installing dependencies for user's code...
installing to /Users/Projects/now-examples/svelte-functions/api
npm WARN svelte-app@1.0.0 No repository field.
npm WARN svelte-app@1.0.0 No license field.

audited 2281 packages in 1.356s
found 0 vulnerabilities

install complete [1780ms]
running user script...
script complete [1ms]
tracing input files...
trace complete [15ms]
> Built @now/node@latest:api/date.js [2s]

/// === Refreshing the page === ///

> GET /
  [23:14:09] 200 ─ 0.36ms ─ /
> GET /global.css
> GET /bundle.css
> GET /bundle.js
  [23:14:09] 200 ─ 0.21ms ─ /global.css
  [23:14:09] 200 ─ 0.42ms ─ /bundle.css
  [23:14:09] 200 ─ 1.43ms ─ /bundle.js
> GET /bundle.css.map
> GET /bundle.js.map
> GET /api/date
> Building @now/node@latest:api/date.js
downloading user files...
download complete [0ms]
installing dependencies for user's code...
  [23:14:09] 200 ─ 0.70ms ─ /bundle.css.map
installing to /Users/Projects/now-examples/svelte-functions/api
  [23:14:09] 200 ─ 1.06ms ─ /bundle.js.map
npm WARN svelte-app@1.0.0 No repository field.
npm WARN svelte-app@1.0.0 No license field.

audited 2281 packages in 1.386s
found 0 vulnerabilities

install complete [1876ms]
running user script...
script complete [1ms]
tracing input files...
trace complete [1ms]
> Built @now/node@latest:api/date.js [2s]

Environment:

{23:17}~/Projects/now-examples/svelte-functions:master βœ“ ➭ node -v
v10.16.3
{23:17}~/Projects/now-examples/svelte-functions:master βœ“ ➭ now -v
16.1.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
thasophearakcommented, Sep 3, 2019

@plrenaudin Thank for the issue.

Do you happen to have Developer Tool open on your browser with Disable cache checkbox checked?

If that the case, this might happen. Since now dev rebuild on hard refresh.

0reactions
paulogdmcommented, Apr 7, 2020

Hello everyone,

We are currently revamping now dev completely. My apologies for the issues that you are facing and the new version of now dev should be out soon. Please reach out to support@zeit.co if you face any issues in the future.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lambda code not updating / kept as cache Β· Issue #864 - GitHub
The cache is invalidated and for the next reload, the new code will run. ... As a development tool, I do not care...
Read more >
AWS Lambda – FAQs
Read our AWS Lambda Frequently Asked Questions (FAQs). ... Visit the Lambda Developer Guide to learn more. Q: Can I share code across...
Read more >
Developing AWS Lambda Functions Locally in VS Code
n this video, I want to share the approach I use regularly to develop AWS Lambda functions (and other serverless projects) locally in...
Read more >
Live Lambda Development - SST docs
Live Lambda Development allows you to debug and test your Lambda functions locally, while being invoked remotely by resources in AWS.
Read more >
How to force AWS SAM CLI to detect changes? - Stack Overflow
You do not need to restart/reload SAM CLI while working on your functions, changes will be reflected instantly/automatically. You only need toΒ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found