Added diagnosis npm install
parent
fa0be55b00
commit
e5aac1942a
|
@ -25,13 +25,27 @@ graph TD
|
|||
style H fill:#f9f,stroke:#333,stroke-width:4px
|
||||
style K fill:#f9f,stroke:#333,stroke-width:4px
|
||||
style J fill:#f9f,stroke:#333,stroke-width:4px
|
||||
style B font-family:monospace
|
||||
```
|
||||
|
||||
## Diagnose `npm install` issues
|
||||
|
||||
Please note that warnings will rarely prevent the solution from working; We only worry about errors.
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
A[Run npm install]
|
||||
A --> B{Errors?}
|
||||
B --> |Yes| C{Are you in root of project?} --> |No| D[Change directory] --> |Retry|A
|
||||
B --> |No| E{Running on Windows?}
|
||||
E --> |Yes| F{Path too long?} --> |Yes| H[Move project to shorter path] --> |Retry|A
|
||||
E --> |No| K[Run spfx doctor]
|
||||
K --> J{Any reported issues?} --> |Yes| L[Fix issuen] --> |Retry|A
|
||||
K --> |No| M{Did you change versions of nodejs after downloading sample?} --> |Yes| N[Run npm rebuild node-sass] --> |Retry|A
|
||||
M --> |No| O[Open a ticket from sample's README]
|
||||
click K "https://github.com/pnp/sp-dev-fx-webparts/wiki/Troubleshooting-issues-with-samples#run-spfx-doctor"
|
||||
style K fill:#f9f,stroke:#333,stroke-width:4px
|
||||
```
|
||||
|
||||
### `npm WARN saveError ENOENT: no such file or directory`
|
||||
|
||||
Make sure that you are running `npm install` in the root folder where the web part code is located. There should be an existing `package.json` file. **Do not** create a `package.json`, because the solution must already have one -- otherwise it would not have been accepted as a sample.
|
||||
|
|
Loading…
Reference in New Issue