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.

Linked package paths are not resolved correctly in 6.0.0-rc.4

See original GitHub issue

Versions

Angular CLI: 6.0.0-rc.4
Node: 9.9.0
OS: darwin x64
Angular: 6.0.0-rc.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.5.6
@angular-devkit/build-angular     0.5.6
@angular-devkit/build-optimizer   0.5.6
@angular-devkit/core              0.5.6
@angular-devkit/schematics        0.5.6
@ngtools/json-schema              1.1.0
@ngtools/webpack                  6.0.0-rc.4
@schematics/angular               0.5.6
@schematics/update                0.5.6
rxjs                              5.6.0-forward-compat.3
typescript                        2.7.2
webpack                           4.5.0

Repro steps

  1. link some package to your Angular app, for example yarn link "@cleverdata/dmpkit"
  2. ng serve

Observed behavior

ERROR in ../cleverdata-dmpkit-common-ui/src/http/index.ts
Module build failed: Error: /Users/akrasman/work/dmpkit/cleverdata-dmpkit-common-ui/src/http/index.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
    at AngularCompilerPlugin.getCompiledFile (/Users/akrasman/work/dmpkit/cleverdata-dmpkit-filemanager-ui/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:707:23)
    at plugin.done.then (/Users/akrasman/work/dmpkit/cleverdata-dmpkit-filemanager-ui/node_modules/@ngtools/webpack/src/loader.js:41:31)
    at <anonymous>

Desired behavior

Linked folders inside node_modules shouldn’t crash build process like in angular-cli@1.7 with option --preserve-symlinks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
filipesilvacommented, May 1, 2018

@Iverson if your app needs --preserve-symlinks to build properly, then you should set it in your angular.json for it to always be used.

You can set it in this section:

      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "preserveSymlinks": true

This way it will always be used, without needing to use the flag every time.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 8, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

resolve.fallback fails for linked packages · Issue #11600 - GitHub
Configuring resolve.fallaback does not work for modules linked from outside the package directory that webpack is being used from.
Read more >
Why isn't the npm link command working? | Benjamin W Fox
This article is for anyone testing npm packages locally and who has struggled (or is struggling) to get to projects connected via npm...
Read more >
Documentation - Module Resolution - TypeScript
Module resolution is the process the compiler uses to figure out what an import refers to. Consider an import statement like import {...
Read more >
React Native: npm link local dependency, unable to resolve ...
The npm link command doesn't work because React Native packager doesn't support symlinks. After a little research, I discovered that there ...
Read more >
Error when you try to copy content to Azure - Microsoft Learn
This article provides a resolution for the problem that occurs when you try to copy content to Microsoft Azure by using a Java-based...
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