Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples do not run from a fresh repo clone when following documented steps #2024

Closed
warrenkc opened this issue Jan 14, 2020 · 8 comments
Closed
Assignees
Labels
Bug Build Build setup: bundlers, packages, styles, UMD, dist

Comments

@warrenkc
Copy link

I am in Ubuntu trying to get the example to work for: https://github.com/transloadit/uppy/tree/master/examples/node-xhr
When I run npm run build I get an error. I recorded the steps so you can see in a video:
https://www.youtube.com/watch?v=tmdBcNxR9Fg&feature=youtu.be

Thank you!

@goto-bus-stop
Copy link
Contributor

Sorry, the instructions are wrong 🙈 they were copied from a different example but the node-xhr one doesn't have a build script, only npm start.

Some of the examples are a bit broken after a change to our build setup a few months ago. I'll push a fix and update the instructions. Thanks for filing this issue!

@goto-bus-stop goto-bus-stop self-assigned this Jan 15, 2020
@goto-bus-stop goto-bus-stop added Bug Build Build setup: bundlers, packages, styles, UMD, dist labels Jan 15, 2020
@goto-bus-stop
Copy link
Contributor

goto-bus-stop commented Jan 15, 2020

This isn't ideal but for now, it works if you go into the repository root, and run this from there:

npm run example "example-name"
# eg. npm run example node-xhr

ideally the examples would be fully standalone, so hopefully we'll have time to address that in the future—this workaround should do the trick in the mean time though.

@warrenkc
Copy link
Author

warrenkc commented Jan 15, 2020 via email

@warrenkc
Copy link
Author

warrenkc commented Jan 15, 2020

If I do that then I see this error below. Here is a video showing the issue:
https://youtu.be/-iFPNBrl_Mg

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using npm@3.5.2
3 info using node@v8.10.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle uppy-build@0.0.0prestart: uppy-build@0.0.0
6 silly lifecycle uppy-build@0.0.0
prestart: no script for prestart, continuing
7 info lifecycle uppy-build@0.0.0start: uppy-build@0.0.0
8 verbose lifecycle uppy-build@0.0.0
start: unsafe-perm in lifecycle true
9 verbose lifecycle uppy-build@0.0.0start: PATH: /usr/share/npm/bin/node-gyp-bin:/home/warrenkc/Documents/uppy jan 15 2020/uppy/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
10 verbose lifecycle uppy-build@0.0.0
start: CWD: /home/warrenkc/Documents/uppy jan 15 2020/uppy
11 silly lifecycle uppy-build@0.0.0start: Args: [ '-c',
11 silly lifecycle 'npm-run-all --parallel watch start:companion web:start' ]
12 info lifecycle uppy-build@0.0.0
start: Failed to exec start script
13 verbose stack Error: uppy-build@0.0.0 start: npm-run-all --parallel watch start:companion web:start
13 verbose stack spawn ENOENT
13 verbose stack at ChildProcess. (/usr/share/npm/lib/utils/spawn.js:17:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid uppy-build@0.0.0
15 verbose cwd /home/warrenkc/Documents/uppy jan 15 2020/uppy
16 error Linux 5.0.0-37-generic
17 error argv "/usr/bin/node" "/usr/bin/npm" "start"
18 error node v8.10.0
19 error npm v3.5.2
20 error file sh
21 error code ELIFECYCLE
22 error errno ENOENT
23 error syscall spawn
24 error uppy-build@0.0.0 start: npm-run-all --parallel watch start:companion web:start
24 error spawn ENOENT
25 error Failed at the uppy-build@0.0.0 start script 'npm-run-all --parallel watch start:companion web:start'.
25 error Make sure you have the latest version of node.js and npm installed.
25 error If you do, this is most likely a problem with the uppy-build package,
25 error not with npm itself.
25 error Tell the author that this fails on your system:
25 error npm-run-all --parallel watch start:companion web:start
25 error You can get information on how to open an issue for this project with:
25 error npm bugs uppy-build
25 error Or if that isn't available, you can get their info via:
25 error npm owner ls uppy-build
25 error There is likely additional logging output above.
26 verbose exit [ 1, true ]

@goto-bus-stop
Copy link
Contributor

goto-bus-stop commented Jan 15, 2020 via email

@warrenkc
Copy link
Author

warrenkc commented Jan 19, 2020 via email

@goto-bus-stop goto-bus-stop reopened this Jan 20, 2020
@goto-bus-stop
Copy link
Contributor

Ah. so you also have to do npm run build once in the repository root, and then the npm run example thing :D Reopening until I have time to fix the documentation again. Thanks for sharing all these error details 👍

@goto-bus-stop goto-bus-stop changed the title Help Wanted Examples do not run from a fresh repo clone when following documented steps Jan 21, 2020
@warrenkc
Copy link
Author

Thank you. I really appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Build Build setup: bundlers, packages, styles, UMD, dist
Projects
None yet
Development

No branches or pull requests

2 participants