Skip to content

Commit 416bc85

Browse files
authored
Merge pull request scratchfoundation#4717 from gunchleoc/add-troubleshooting-documentation
Add troubleshooting documentation
2 parents 88a5ab8 + 327983f commit 416bc85

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,66 @@ If you want to watch the browser as it runs the test, rather than running headle
130130
USE_HEADLESS=no $(npm bin)/jest --runInBand test/integration/backpack.test.js
131131
```
132132

133+
## Troubleshooting
134+
135+
### Ignoring optional dependencies
136+
137+
When running `npm install`, you can get warnings about optionsl dependencies:
138+
139+
```
140+
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
141+
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
142+
```
143+
144+
You can suppress them by adding the `no-optional` switch:
145+
146+
```
147+
npm install --no-optional
148+
```
149+
150+
Further reading: [Stack Overflow](https://stackoverflow.com/questions/36725181/not-compatible-with-your-operating-system-or-architecture-fsevents1-0-11)
151+
152+
### Resolving dependencies
153+
154+
When installing for the first time, you can get warnings which need to be resolved:
155+
156+
```
157+
npm WARN [email protected] requires a peer of babel-eslint@^8.0.1 but none was installed.
158+
npm WARN [email protected] requires a peer of eslint@^4.0 but none was installed.
159+
npm WARN [email protected] requires a peer of react-intl-redux@^0.7 but none was installed.
160+
npm WARN [email protected] requires a peer of react-responsive@^4 but none was installed.
161+
```
162+
163+
You can check which versions are available:
164+
165+
```
166+
npm view react-intl-redux@0.* version
167+
```
168+
169+
You will neet do install the required version:
170+
171+
```
172+
npm install --no-optional --save-dev react-intl-redux@^0.7
173+
```
174+
175+
The dependency itself might have more missing dependencies, which will show up like this:
176+
177+
```
178+
user@machine:~/sources/scratch/scratch-gui (491-translatable-library-objects)$ npm install --no-optional --save-dev react-intl-redux@^0.7
179+
[email protected] /media/cuideigin/Linux/sources/scratch/scratch-gui
180+
181+
└── UNMET PEER DEPENDENCY [email protected]
182+
```
183+
184+
You will need to install those as well:
185+
186+
```
187+
npm install --no-optional --save-dev react-responsive@^5.0.0
188+
```
189+
190+
Further reading: [Stack Overflow](https://stackoverflow.com/questions/46602286/npm-requires-a-peer-of-but-all-peers-are-in-package-json-and-node-modules)
191+
192+
133193
## Publishing to GitHub Pages
134194
You can publish the GUI to github.io so that others on the Internet can view it.
135195
[Read the wiki for a step-by-step guide.](https://github.com/LLK/scratch-gui/wiki/Publishing-to-GitHub-Pages)

0 commit comments

Comments
 (0)