Open ciufudean opened 3 years ago
Apologies for the trouble! The current instructions for running the examples are out of date. I'll ask the team to fix that up. To get this running, you'll need to run npm run build
in between running npm install
and node server.js
.
I thought this is the case, but build
was failing for me too, so I used the dist file from the npm dropbox
package.
I see, thanks for the information. Installing from a package manager is certainly fine, but if you'd like us to look into the build issue anyway, please share the error output you're getting from npm run build
.
e:\temp\dropbox-sdk-js>npm run build
dropbox@9.6.0 build e:\temp\dropbox-sdk-js npm run build:es && npm run build:cjs && npm run build:umd && npm run build:umd:min
dropbox@9.6.0 build:es e:\temp\dropbox-sdk-js cross-env BABEL_ENV=es babel src -d es/src; cross-env BABEL_ENV=es babel lib -d es/lib; cross-env BABEL_ENV=es babel index.js -d es
babel: cross-env does not exist BABEL_ENV=es does not exist babel does not exist npm ERR! code ELIFECYCLE npm ERR! errno 2
Thanks! Those should have been installed by npm install
. Did the npm install
command also fail? Can you share the output for that if so?
I found the cause. Your build:xx
npm scripts are using ;
as a command separator, while on Windows this is &
or &&
.
And a few solutions here
Thanks! We'll look into it.
Documentation still wrong a year later
@RichardJECooke Thanks for the note. This is still open with the team. I'll check in with them on this and follow up here with any updates.
The ';' on windows is indeed an issue. Switching to '&' was the fix for the build.
Describe the bug I am following the instructions at https://github.com/dropbox/dropbox-sdk-js/tree/main/examples/javascript to run the examples server.
node server.js
crashes withVersions
Additional context Add any other context about the problem here.