Field 'browser' doesn't contain a valid alias configuration

后端 未结 16 2307
无人共我
无人共我 2020-12-01 11:54

I\'ve started using webpack2 (to be precise, v2.3.2) and after re-creating my config I keep running into an issue I can\'t seem to solve I get (sorry in advance

16条回答
  •  醉梦人生
    2020-12-01 12:16

    In my case, it was due to a broken sym link when trying to npm link a custom angular library to consuming app. After running npm link @authoring/canvas

    ```"@authoring/canvas": "path/to/ui-authoring-canvas/dist"``

    It appear everything was OK but the module still couldn't be found:

    When I corrected the import statement to something that the editor could find Link:

    import {CirclePackComponent} from '@authoring/canvas/lib/circle-pack/circle-pack.component';

    I received this which is mention in the overflow thread:

    To fix this I had to:

    1. cd /usr/local/lib/node_modules/packageName
    2. cd ..
    3. rm -rf packageName
    4. In the root directory of the library, run: a. rm -rf dist b. npm run build c. cd dist d. npm link

    5. In the consuming app, update the package.json with "packageName":"file:/path/to/local/node_module/packageName""

    6. In the root directory of the consuming app run npm link packageName

提交回复
热议问题