-
Notifications
You must be signed in to change notification settings - Fork 354
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
Basic authentication code example refers to non-existent files #992
Comments
After deleting else {
showPageSection("pre-auth-section");
// Set the login anchors href using dbx.getAuthenticationUrl()
var dbx = new Dropbox.Dropbox({
clientId: CLIENT_ID
}); |
The "/__build__/Dropbox-sdk.min.js" reference is meant to point to the built version of the SDK, so you'd need to follow the instructions here to build it and run the examples. Alternatively, you can replace that reference with a built version of the SDK, e.g., from a CDN of your choice, instead, such as on npmcdn |
I followed the instructions you posted, thanks, https://github.com/dropbox/dropbox-sdk-js/tree/main/examples/javascript. I cloned the repo, npm install, and ran the program, but it just gives me an error: dropbox_sdk/examples/javascript$ node ./server.js
/home/rje/mi/code/dropbox_sdk/node_modules/rollup-endpoint/index.js:15
throw Error('[rollup-endpoint] File does not exist: ' + options.entry);
^
Error: [rollup-endpoint] File does not exist: /home/rje/mi/code/dropbox_sdk/dist/Dropbox-sdk.js
at Object.exports.serve (/home/rje/mi/code/dropbox_sdk/node_modules/rollup-endpoint/index.js:15:11)
at Object.<anonymous> (/home/rje/mi/code/dropbox_sdk/examples/javascript/server.js:12:10)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47 |
This documentation bug seems to be already here a year ago: #621 |
@RichardJECooke Thanks for the note. I'll follow up with you on #621 and your new issue #1001. |
Describe the bug
Downloading this code sample, https://github.com/dropbox/dropbox-sdk-js/blob/main/examples/javascript/auth/index.html, and running it in a browser gives errors.
Some files, like the utils.js and css files, are easily found higher up in the file tree and I can fix your code by changing the reference. But
<script src="/__build__/Dropbox-sdk.min.js"></script>
doesn't exist anywhere.To Reproduce
Download the code samples and open https://github.com/dropbox/dropbox-sdk-js/blob/main/examples/javascript/auth/index.html in a browser.
Expected Behavior
It works
Actual Behavior
Errors
The text was updated successfully, but these errors were encountered: