Skip to content

Bug report: incorrect order of scripts to execute when upgrading SPFx projects #2358

Description

@waldekmastykarz

Description

When upgrading SPFx project from v1.10.0 to latest preview, we show scripts to execute in wrong order, which leads to a broken project.

Steps to reproduce

m365 spfx project upgrade --preview -o md > report.md on an SPFx v1.10.0 react web part project.

Expected result

npm un -S @types/react @types/react-dom @types/webpack-env @types/es6-promise
npm un -D @types/chai @types/mocha
npm i -SE @microsoft/sp-core-library@1.12.1-rc.0 @microsoft/sp-lodash-subset@1.12.1-rc.0 @microsoft/sp-office-ui-fabric-core@1.12.1-rc.0 @microsoft/sp-webpart-base@1.12.1-rc.0 @microsoft/sp-property-pane@1.12.1-rc.0 react@16.9.0 react-dom@16.9.0 office-ui-fabric-react@7.156.0
npm i -DE @microsoft/sp-build-web@1.12.1-rc.0 @microsoft/sp-module-interfaces@1.12.1-rc.0 @microsoft/sp-webpart-workbench@1.12.1-rc.0 @microsoft/sp-tslint-rules@1.12.1-rc.0 gulp@4.0.2 @types/react@16.9.36 @types/react-dom@16.9.8 @types/webpack-env@1.13.1 @types/es6-promise@0.0.33 @microsoft/rush-stack-compiler-3.3@0.3.5

Actual result

npm i -SE @microsoft/sp-core-library@1.12.1-rc.0 @microsoft/sp-lodash-subset@1.12.1-rc.0 @microsoft/sp-office-ui-fabric-core@1.12.1-rc.0 @microsoft/sp-webpart-base@1.12.1-rc.0 @microsoft/sp-property-pane@1.12.1-rc.0 react@16.9.0 react-dom@16.9.0 office-ui-fabric-react@7.156.0
npm i -DE @microsoft/sp-build-web@1.12.1-rc.0 @microsoft/sp-module-interfaces@1.12.1-rc.0 @microsoft/sp-webpart-workbench@1.12.1-rc.0 @microsoft/sp-tslint-rules@1.12.1-rc.0 gulp@4.0.2 @types/react@16.9.36 @types/react-dom@16.9.8 @types/webpack-env@1.13.1 @types/es6-promise@0.0.33 @microsoft/rush-stack-compiler-3.3@0.3.5
npm un -S @types/react @types/react-dom @types/webpack-env @types/es6-promise
npm un -D @types/chai @types/mocha

Notice how uninstall comes after install which means that whatever new versions have been installed, they're immediately uninstalled.

Environment

Latest CLI

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions