Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7161 Fix error raw loader module not found in angular 8 #7207

Merged
merged 2 commits into from
Aug 19, 2019

Conversation

baraalex
Copy link
Contributor

@baraalex baraalex commented Jun 26, 2019

Issue: #7161

What I did

Fix error webpack not finding raw-loader on angular build.

Webpack documentation on how to use webpack loaders

@vercel
Copy link

vercel bot commented Jun 26, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://monorepo-git-fork-baraalex-7161-raw-loader-module-not-found.storybook.now.sh

@stale
Copy link

stale bot commented Jul 18, 2019

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Jul 18, 2019
@stale stale bot removed the inactive label Jul 19, 2019
@kroeder kroeder self-assigned this Jul 26, 2019
@kroeder kroeder added the bug label Jul 26, 2019
Copy link
Member

@kroeder kroeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable, the docs describe to use loader like that and all tests have passed.
LGTM

I'm not sure why this

  1. has worked before
  2. does fix the original issue. I could create an ng8 app without having trouble with raw-loader
    @baraalex could you explain this if possible, please?

@shilman any doubts merging this?

@shilman
Copy link
Member

shilman commented Jul 27, 2019

@kroeder I don't really understand the change. @ndelangen can you take a look?

@ndelangen
Copy link
Member

loader: require.resolve('ts-loader')

will enforce to resolve the ts-loader from the current file (/node_modules/@storybook/angular/..)

loader: 'ts-loader'

will have let webpack figure it out, I think that might resolve it from where the file is required.


In either case, at least one raw-loader should be at /node_modules/raw-loader. I don't understand why raw-loader would ever not be found.


Fix error webpack not finding raw-loader on angular build.

Do you mean a build of the angular app or building a static version of storybook for angular?

@baraalex
Copy link
Contributor Author

baraalex commented Aug 6, 2019

In either case, at least one raw-loader should be at /node_modules/raw-loader. I don't understand why raw-loader would ever not be found.

I don't know why but I have an app on angular and when I updated it to angular 8, with the angular client, it stopped to work and it was because raw-loader couldn't be found.

Do you mean a build of the angular app or building a static version of storybook for angular?

Both building a static version and running storybook live version were failing because of this problem.
I looked into webpack documentation and the recommendation is to use the loader: 'ts-loader' expression as I linked on the description of the PR and it seems to solve all the issues with this error

@ndelangen ndelangen merged commit 5257b5e into storybookjs:next Aug 19, 2019
@ndelangen ndelangen added this to the 5.2.0 milestone Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants