0

I am using - following configuration on windows 8 64 bit.

Angular CLI: 1.6.4 Node: 8.9.4 OS: win32 x64 Angular: 5.2.2
typescript: 2.5.3 webpack: 3.10.0

Following error occurs when trying to (compile webpack)run angular on cli:-

ERROR in
./node_modules/css-loader?{"sourceMap":false,"import":false}!./node_mod
ules/postcss-loader/lib?{"ident":"postcss","sourceMap":false}!./src/styles.css
Module build failed: Error: Can't resolve
'~bootstrap/dist/css/bootstrap.css' in 'F:\code\hello-world\src' at
onError
(F:\code\hello-world\node_modules\enhanced-resolve\lib\Resolver.j
s:61:15)

@ ./src/styles.css 4:14-138 @ multi ./src/styles.css

webpack: Failed to compile.

1 Answer 1

1

There are some things you can try,

  1. Run npm install command again.
  2. Try delete the entire npm_modules folder and run npm install.
  3. Try reinstalling bootstrap.
  4. Make sure you are installing the latest bootstrap.
  5. Try updating the Angular CLI as some version of it has some issues, or uninstall and install it.
  6. If none of the above worked, you can do npm rebuild node-sass command.

I hope any of the above steps will work for you.

Sign up to request clarification or add additional context in comments.

2 Comments

& here is thank you sibeesh it worked brother...what i did is just uninstalled ng cli and re-installed it. Thank you:-)
@Dhiraj B I am happy that it helped you, if you don't mind, please vote and accept it as answer, so that it will help other users.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.