Meta tags:
description= Command serve Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was No response Description In a workspace with an application and a separate Angular libr...;
Headings (most frequently used words):
navigation, description, metadata, footer, this, was, reproduction, commented, on, nov, 2026, dev, server, keeps, stale, code, of, linked, file, library, after, ng, packagr, watch, rebuilds, it, rebuild, reported, restart, required, 34728, menu, repository, activity, issue, actions, command, is, regression, the, previous, version, in, which, bug, not, present, minimal, minimum, exception, or, error, your, environment, anything, else, relevant, meakib, 16, luisescamillamartin, 17, assignees, labels, type, projects, milestone, relationships, development,
Text of the page (most frequently used words):
the (88), libreria (46), and (33), #library (27), #angular (18), with (18), build (16), code (16), github (15), serve (13), dist (13), this (11), app (11), from (10), mjs (10), linked (10), path (9), stale (9), 2026 (8), for (8), drive (8), junction (8), file (8), not (7), letter (7), nov (7), watch (7), new (7), you (6), actions (6), casing (6), watcher (6), cache (6), lib (6), node_modules (6), npm (6), after (6), luisescamillamartin (6), security (5), copilot (5), issue (5), development (5), one (5), sign (5), reported (5), target (5), real (5), dev (5), server (5), bundle (5), restarting (5), repro (5), fesm2022 (5), cli (5), main (5), your (5), log (5), source (5), packagr (5), shell (4), which (4), uppercase (4), without (4), install (4), but (4), added (4), rebuild (4), all (4), restart (4), console (4), application (4), rebuilds (4), previous (4), support (4), that (3), navigation (3), open (3), needstriage (3), milestone (3), projects (3), area (3), lowercase (3), content (3), windows (3), was (3), only (3), changes (3), served (3), into (3), reproduction (3), more (3), run (3), json (3), poll (3), 1000 (3), prebundle (3), exclude (3), package (3), fixes (3), map (3), old (3), true (3), false (3), copy (3), link (3), 34728 (3), keeps (3), required (3), quality (3), another (3), tab (3), window (3), refresh (3), session (3), reload (3), developers (3), changelog (3), customer (3), enterprise (3), grade (3), features (3), community (2), status (2), footer (2), pull (2), requests (2), type (2), labels (2), metadata (2), already (2), created (2), what (2), used (2), paths (2), when (2), would (2), cmd (2), setup (2), project (2), starting (2), reach (2), breakpoints (2), both (2), bind (2), correctly (2), uses (2), then (2), get (2), item (2), case (2), invalidation (2), reports (2), removed (2), modified (2), changing (2), verbose (2), commented (2), could (2), prints (2), whether (2), tried (2), reproduce (2), same (2), sibling (2), workspace (2), default (2), meakib (2), robot (2), preservesymlinks (2), else (2), error (2), success (2), until (2), next (2), change (2), options (2), stopping (2), sourcescontent (2), while (2), embedded (2), generation (2), complete (2), still (2), runs (2), service (2), configuration (2), create (2), add (2), contains (2), description (2), version (2), work (2), insights (2), 196 (2), repository (2), signed (2), universe (2), training (2), integrations (2), stories (2), center (2), documentation (2), learn (2), business (2), products (2), secret (2), can, perform, action, time, share, personal, information, manage, cookies, contact, docs, privacy, terms, inc, branches, none, yet, relationships, due, date, assigned, assignees, comment, have, account, join, conversation, free, problem, some, terminals, use, differs, kept, normalizing, least, invalidating, probably, avoid, thing, changed, between, failing, working, also, checked, task, debugger, attached, chrome, stop, recreated, whose, cwd, powershell, now, returns, rmdir, resolves, differ, consistent, sensitive, types, thanks, looking, output, repo, author, last, edited, help, maintainers, paste, block, triggers, comparing, those, exact, strings, separators, should, show, reporting, matches, sensitively, doesn, recognize, macos, using, topology, creating, symlinked, rebuilt, propagated, cases, looks, specific, handling, rather, than, general, flow, contributor, activity, bundled, its, outside, anything, relevant, node, manager, operating, system, win32, x64, environment, exception, https, com, minimum, instead, remove, line, did, launch, name, deleting, works, things, disk, does, contain, has, terminal, searching, shows, actual, expected, wait, finishes, method, containing, call, root, component, once, generate, steps, enabled, vendor, styles, scripts, sourcemap, extractlicenses, optimization, configurations, set, enabling, option, sources, resolve, under, folder, links, built, folders, proyecto, minimal, determine, memory, load, something, updated, seems, read, reused, separate, dependency, rebuilding, mode, makes, print, compiled, appears, response, bug, present, yes, behavior, regression, command, body, opened, items, issues, message, dismiss, alert, switched, accounts, out, appearance, settings, search, pricing, event, talks, workshops, partners, about, company, forum, events, webinars, blog, resource, connect, resources, premium, advanced, ons, trust, why, evaluate, see, industries, government, manufacturing, financial, services, healthcare, industry, nonprofits, startups, team, enterprises, stage, businesses, latest, improvements, across, place, developer, articles, sponsors, trending, repos, explore, customize, certifications, scanning, leak, prevention, protection, vulnerability, detection, remediation, secure, cloud, environments, codespaces, analysis, enforcement, automation, ship, coding, agent, tasks, automated, hosting, review, collaboration, platform, menu, skip,
Text of the page (random words):
dev server keeps stale code of a linked file library after ng packagr watch rebuilds it rebuild reported restart required issue 34728 angular angular cli github skip to content navigation menu sign in products platform github repository hosting code review and collaboration copilot ai coding agent for tasks projects and automated work build ship actions ci cd and automation code quality quality analysis fixes and enforcement codespaces cloud development environments secure code security vulnerability detection and remediation secret protection secret scanning and leak prevention all features developers learn documentation training certifications build build with copilot customize copilot integrations explore trending repos github sponsors developer articles changelog changelog your source for the latest features improvements and fixes across github products all in one place businesses by stage enterprises team startups nonprofits by industry healthcare financial services manufacturing government see all industries evaluate github why github customer stories business insights trust center add ons github advanced security enterprise grade code security copilot for business enterprise grade ai features premium support enterprise grade 24 7 support resources learn connect documentation resource center blog events webinars community forum customer stories integrations support customer support training github status company about partners changelog github universe github universe the event for developers by developers talks workshops and what s next for github pricing search sign in sign up appearance settings you signed in with another tab or window reload to refresh your session you signed out in another tab or window reload to refresh your session you switched accounts on another tab or window reload to refresh your session dismiss alert message angular angular cli repository navigation code issues 196 196 pull requests 20 20 actions security and quality 8 8 insights more items dev server keeps stale code of a linked file library after ng packagr watch rebuilds it rebuild reported restart required 34728 new issue copy link new issue copy link open open dev server keeps stale code of a linked file library after ng packagr watch rebuilds it rebuild reported restart required 34728 copy link labels area angular build milestone needstriage description luisescamillamartin opened on nov 16 2026 issue body actions command serve is this a regression yes this behavior used to work in the previous version the previous version in which this bug was not present was no response description in a workspace with an application and a separate angular library linked with a file dependency rebuilding the library in watch mode makes ng serve print application bundle generation complete but the application bundle main js still contains the previous compiled code of the library the new code only appears after stopping and restarting ng serve the source map embedded in the same main js already contains the new library source sourcescontent while the code is the old one so the updated map file seems to be re read but the content of libreria mjs is reused from a previous build i could not determine whether this is the in memory load cache the file watcher or something else minimal reproduction setup windows project and library in sibling folders d proyecto 22 and d libreria 22 library built with ng build libreria watch configuration development ng packagr app package json libreria file libreria 22 dist libreria npm install links false so node_modules libreria is a junction to libreria 22 dist libreria preservesymlinks is not set enabling it is not an option for me the library sources then resolve under the app s folder and breakpoints in the library do not bind in vs code angular json of the app build configurations development optimization false extractlicenses false sourcemap scripts true styles true vendor true serve options poll 1000 prebundle exclude libreria angular cli cache enabled default steps to reproduce create the app and a library ng new ng generate library libreria and build the library once into dist libreria in the app add libreria file libreria 22 dist libreria and run npm install in the library create a service with a method containing console log v1 and call it from the app s root component run ng build libreria watch configuration development in the library and ng serve in the app change the log in the library service to console log v2 and wait until ng packagr finishes expected the dev server rebuilds and the app runs v2 actual the terminal prints application bundle generation complete but the app still runs v1 searching main js shows the old code libreria 22 dist libreria fesm2022 libreria mjs console log v1 old code while the embedded source map has the new source sourcescontent console log v2 dist libreria fesm2022 libreria mjs on disk does contain the new code stopping and restarting ng serve fixes it things i tried without success poll 1000 in serve options with restart deleting angular cache and restarting works until the next library change prebundle exclude with the package name starting from a shell with the drive letter in uppercase d instead of lowercase remove this line if you did not launch ng serve from that shell minimum reproduction https github com luisescamillamartin repro linked lib stale exception or error no error the build reports success your environment angular cli 22 2 5 node js 24 21 0 package manager npm 11 19 0 operating system win32 x64 anything else relevant without preservesymlinks the library is bundled into main js from its real path libreria 22 dist libreria fesm2022 libreria mjs outside node_modules activity angular robot added area angular build on nov 16 2026 angular robot added this to the needstriage milestone on nov 16 2026 meakib commented on nov 16 2026 meakib on nov 16 2026 contributor more actions i tried to reproduce this on macos with cli 22 2 5 using the same topology sibling library workspace npm install lib ws dist libreria creating a symlinked node_modules libreria prebundle exclude library rebuilt with ng build watch with both the default watcher and poll 1000 changes propagated to the served main js correctly in all cases so this looks specific to windows path handling junction real path or drive letter casing rather than the general linked library flow luisescamillamartin it would help the maintainers if you could run ng serve verbose and after changing the library paste the json block of added modified removed paths it prints when the rebuild triggers comparing those exact strings casing separators junction vs real path with d libreria 22 dist libreria fesm2022 libreria mjs should show whether the watcher is reporting a path that the build s cache invalidation which matches case sensitively doesn t recognize luisescamillamartin commented on nov 17 2026 luisescamillamartin on nov 17 2026 last edited by luisescamillamartin author more actions thanks for looking into it output of ng serve verbose after changing the library this is on the reproduction repo added modified d angular repro linked lib stale libreria 22 dist libreria fesm2022 libreria mjs d angular repro linked lib stale libreria 22 dist libreria types libreria d ts removed the watcher reports the path with an uppercase drive letter but the junction target created by npm uses a lowercase one ps get item node_modules libreria target d angular repro linked lib stale libreria 22 dist libreria so the real path the build resolves d libreria mjs and the path reported by the watcher d libreria mjs differ only in the drive letter casing which is consistent with a case sensitive cache invalidation i recreated the junction from a shell whose cwd uses an uppercase drive letter cmd c rmdir node_modules libreria then npm install from powershell in d get item node_modules libreria target now returns d angular repro linked lib stale libreria 22 dist libreria and library changes reach the served bundle without restarting ng serve i also checked it in my real project starting the dev server from vs code ng serve as a task with the debugger attached to chrome with the junction target in uppercase d library changes reach the served bundle without restarting ng serve and breakpoints in both the app and the library bind and stop correctly the casing of the junction target was the only thing i changed between the failing and the working setup so the problem is the drive letter casing with a junction created from a lowercase drive shell d which is what cmd and some terminals use the path used by the build d libreria mjs differs from the one reported by the watcher d libreria mjs and the stale content is kept normalizing the casing of paths at least the drive letter on windows when invalidating the cache would probably avoid it sign up for free to join this conversation on github already have an account sign in to comment metadata metadata assignees no one assigned labels area angular build type no type projects no projects milestone needstriage no due date relationships none yet development no branches or pull requests issue actions open in github copilot app footer 2026 github inc footer navigation terms privacy security status community docs contact manage cookies do not share my personal information you can t perform that action at this time
|