Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Express Basics Using Templates with Express Using Pug in Your Express App

Armand Ramos
Armand Ramos
6,002 Points

I cannot install pug using the command "npm install pug --save". I get a "RollbackFailedOptional" ...

I dont know what else to look for in the error so if you need me to upload a picture or something let me know! Im stuck until this finishes. I may just try to proceed without pug html

3 Answers

Adam Beer
Adam Beer
11,314 Points

Could you try npm install pug@latest?

Armand Ramos
Armand Ramos
6,002 Points

Treehouse\flashcards>npm install pug@latest [..................] / rollbackFailedOptional: verb npm-session 7dd47422f21c782b

That's what my command prompt returns and it just freezes there,...

Now its trying

[..................] \ fetchMetadata: sill resolveWithNewModule pug@2.0.3 checking installable status

Armand Ramos
Armand Ramos
6,002 Points

npm install pug@latest npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation. [..................] / fetchMetadata: sill resolveWithNewModule pug-code-gen@2.0.1 checking installable status

I hit enter and that happened. Still frozen though

Armand Ramos
Armand Ramos
6,002 Points

I see the error on line 21 but Im not sure what to do with that info =/

Armand Ramos
Armand Ramos
6,002 Points

Got it I think, it shows up now but we'll see if it works, thanks.

Adam Beer
Adam Beer
11,314 Points

Please show your code.

Code

Wrap your code with 3 backticks (```) on the line before and after. If you specify the language after the first set of backticks, that'll help us with syntax highlighting.

      ```html
      <p>This is code!</p>
      ```