Skip to content

ERROR [preprocess]: Can not load "webpack"! TypeError: Cannot read property 'plugin' of undefined #7443

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

Closed
ravidannani opened this issue Aug 19, 2017 · 6 comments

Comments

@ravidannani
Copy link

After installing angular cli, I ran the below commands and able to open the application on browser.
ng new my-dream-app
cd my-dream-app
ng serve

But inorder to do testing, executed ng test command, but getting the below issue. Not sure how to proceed further.

image

Could you please let me know if i did any mistake.

@ebuychance
Copy link

I ran into this same issue. I was able to add

"@ngtools/webpack": "^1.6.2"

to the devDependencies as a fix for a newly generated project but this temp fix did not work with another recently created app I developed.
I read about adding a tsconfig.spec.ts as a fix as well here: #6457

Currently still unable to fix my issue.

@amrography
Copy link

+1

@ebuychance
Copy link

ng -v
angular-cli: 1.0.0-beta.28.3
node: 8.3.0
os: win32 x64

Upgrading to @angular/cli: 1.3.2 solved my issues.

@Brocco
Copy link
Contributor

Brocco commented Aug 29, 2017

It appears you have a much older version of the CLI (still using the package name angular-cli)

You will want to remove that package and install the current version...

npm uninstall angular-cli -g
npm install @angular/cli -g

Also, you'll want to ensure your versions are up to date, which you can find under prerequisites

@Brocco Brocco closed this as completed Aug 29, 2017
@uglycoyote
Copy link

I got burned by this as well. I did see the message when running ng test which said

As a forewarning, we are moving the CLI npm package to "@angular/cli" with the next release,

However, I read this as a forewarning about something that would happen in the future, where I should have read it as something which was in the near-future of the long-ago-past, which means it's still in the past from where the present currently is.

It would have been better if whoever typed the "forewarning" instead said something like "As of DATE, the angular-cli repository is deprecated and you should be using @angular/cli"

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants