Sp-dev-docs: npm install fails since flatmap-stream removed from npm

Created on 27 Nov 2018  路  6Comments  路  Source: SharePoint/sp-dev-docs

Category

  • [ ] Question
  • [ ] Typo
  • [x] Bug
  • [ ] Additional article idea

Using v1.7.0, npm install no longer works since flatmap-stream was removed from npm after being discovered it was maliciously added as a dependency to event-stream.

The dependency chain for event-stream starts at @microsoft/gulp-core-build-serve and an issue has been raised in that repo.

Once that has been released can you please expedite a v1.7.1 release including the updated dependency?

tooling bug-suspected

Most helpful comment

Is there a chance that your shrinkwrap file is referencing the older version? Can you delete your shrinkwrap file and rerun npm install?

Here is what a clean project from this morning gave me -

npm list flatmap-stream

`-- (empty)

npm list event-stream

`-- @microsoft/[email protected]
  +-- @microsoft/[email protected]
  | `-- [email protected]
  |   `-- [email protected]
  `-- @microsoft/[email protected]
    `-- [email protected]
      `-- [email protected]

All 6 comments

OK, that's weird. I ran through this this morning explicitly to double check this, and didn't hit an issue (and explicitly removed any local .npmrc file that would intercept installs). Are you using rush in your toolchain by any chance?

At any rate - looking into this.

Also, if you run npm list flatmap-stream what is the path that is shown?

No we're not using rush, just vanilla SPFX v1.7.0.

Also, if you run npm list flatmap-stream what is the path that is shown?

`-- @microsoft/[email protected]
  `-- @microsoft/[email protected]
    `-- [email protected]
      `-- [email protected]
        `-- [email protected]

Is there a chance that your shrinkwrap file is referencing the older version? Can you delete your shrinkwrap file and rerun npm install?

Here is what a clean project from this morning gave me -

npm list flatmap-stream

`-- (empty)

npm list event-stream

`-- @microsoft/[email protected]
  +-- @microsoft/[email protected]
  | `-- [email protected]
  |   `-- [email protected]
  `-- @microsoft/[email protected]
    `-- [email protected]
      `-- [email protected]

@patmill so essentially yes you were correct. The reason I was encountering an issue was due to the fact that [email protected] was removed from npm but in order to force npm to get [email protected] I had to both delete my package lock (shrinkwrap) file and remove node_modules. Once I did both of this then the project successfully installs.

Thanks for your assistance!

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

Was this page helpful?
0 / 5 - 0 ratings