Added clickable steps

Hugo Bernier 2022-03-27 00:16:12 -04:00
parent 4ad7d11548
commit 7ab74f26dc
1 changed files with 3 additions and 9 deletions

@ -35,7 +35,7 @@ Please note that warnings will rarely prevent the solution from working; We only
graph TD graph TD
A[Run npm install] A[Run npm install]
A --> B{Errors?} A --> B{Errors?}
B --> |Yes| C{Are you in root of project?} --> |No| D[Change directory] --> |Retry|A B --> |Yes| C{Are you in root of project?} --> |No| D[Change directory to root of project] --> |Retry|A
B --> |No| E{Running on Windows?} B --> |No| E{Running on Windows?}
E --> |Yes| F{Path too long?} --> |Yes| H[Move project to shorter path] --> |Retry|A E --> |Yes| F{Path too long?} --> |Yes| H[Move project to shorter path] --> |Retry|A
E --> |No| K[Run spfx doctor] E --> |No| K[Run spfx doctor]
@ -44,21 +44,15 @@ graph TD
M --> |No| O[Open a ticket from sample's README] 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" 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 style K fill:#f9f,stroke:#333,stroke-width:4px
style D fill:#f9f,stroke:#333,stroke-width:4px
``` ```
### `npm WARN saveError ENOENT: no such file or directory` ### Change directory to root of project
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. 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.
If you're already currently in the root of the sample solution, take a look to see if the sample contains sub-components; are there any folders named `webparts` (or something similar)? If so, try looking for the `README.md` for instructions on how to build the sample. If you're already currently in the root of the sample solution, take a look to see if the sample contains sub-components; are there any folders named `webparts` (or something similar)? If so, try looking for the `README.md` for instructions on how to build the sample.
### `Build FAILED`
You should see at least one line showing `npm ERR!` in the many many lines of diagnostics after running `npm install`.
Look for messages such as `Not compatible with your version of node/npm`.
Try [running `spfx doctor`](#run-spfx-doctor) to make sure your environment is compatible with the solution.
## Sample won't build ## Sample won't build