ericyd / gdrive-copy

Web app to copy a Google Drive folder
https://script.google.com/macros/s/AKfycbxbGNGajrxv-HbX2sVY2OTu7yj9VvxlOMOeQblZFuq7rYm7uyo/exec
MIT License
1.58k stars 341 forks source link

Unable to make a copy of script. #87

Closed cewong2 closed 5 years ago

cewong2 commented 5 years ago

Are you requesting a feature or reporting a bug?

bug

If reporting a bug, is there already an issue open for this same bug?

no

What is the current behavior?

Let me start off by saying i'm not a programmer by any means, and have very little programming skills. So I used the instructions given in the "for Non-developers"

I've tried using Windows Git, Git Bash, and ultimately it seems the furthest I can get is with google's own Cloud Shell. I was able to clone, and install NPM, but when I run the "npm run build:prod" command I get an error

Child extract-text-webpack-plugin: [0] ./~/css-loader/lib/css-base.js 1.51 kB {0} [built] [1] ./~/css-loader!./~/postcss-loader/src!./src/css/main.scss 5.29 kB {0} [built]

google-drive-copy-folder@6.0.3 gulp:prod /home/username/gdrive-copy gulp build

gulp[988]: ../src/node_contextify.cc:633:static void node::contextify::ContextifyScript::New(const v8::FunctionCallbackInfo&): Assertion args[1]->IsString()' failed. 1: 0x8db8c0 node::Abort() [gulp] 2: 0x8db995 [gulp] 3: 0x90f647 node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<v8::Value> const&) [gulp] 4: 0xb5d76b [gulp] 5: 0xb5f702 v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [gulp] 6: 0x1a9b34adbe1d Aborted (core dumped) npm ERR! code ELIFECYCLE npm ERR! errno 134 npm ERR! google-drive-copy-folder@6.0.3 gulp:prod:gulp build` npm ERR! Exit status 134 npm ERR! npm ERR! Failed at the google-drive-copy-folder@6.0.3 gulp:prod script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/username/.npm/_logs/2019-02-28T05_06_06_604Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 134 npm ERR! google-drive-copy-folder@6.0.3 build:prod: npm run webpack:prod && npm run gulp:prod npm ERR! Exit status 134 npm ERR! npm ERR! Failed at the google-drive-copy-folder@6.0.3 build:prod script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/username/.npm/_logs/2019-02-28T05_06_06_632Z-debug.log

this is the log file it refereces:

0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/nvm/versions/node/v10.14.2/bin/node', 1 verbose cli '/usr/local/nvm/versions/node/v10.14.2/bin/npm', 1 verbose cli 'run', 1 verbose cli 'build:prod' ] 2 info using npm@6.8.0 3 info using node@v10.14.2 4 verbose run-script [ 'prebuild:prod', 'build:prod', 'postbuild:prod' ] 5 info lifecycle google-drive-copy-folder@6.0.3~prebuild:prod: google-drive-copy-folder@6.0.3 6 info lifecycle google-drive-copy-folder@6.0.3~build:prod: google-drive-copy-folder@6.0.3 7 verbose lifecycle google-drive-copy-folder@6.0.3~build:prod: unsafe-perm in lifecycle true 8 verbose lifecycle google-drive-copy-folder@6.0.3~build:prod: PATH: /usr/local/nvm/versions/node/v10.14.2/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/elliott/gdrive-copy/node_modules/.bin:/home/elliott/gopath/bin:/google/gopath/bin:/google/google-cloud-sdk/bin:/usr/local/go/bin:/opt/gradle/bin:/opt/maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/nvm/versions/node/v10.14.2/bin:/google/go_appengine:/google/google_appengine 9 verbose lifecycle google-drive-copy-folder@6.0.3~build:prod: CWD: /home/elliott/gdrive-copy 10 silly lifecycle google-drive-copy-folder@6.0.3~build:prod: Args: [ '-c', 'npm run webpack:prod && npm run gulp:prod' ] 11 silly lifecycle google-drive-copy-folder@6.0.3~build:prod: Returned: code: 134 signal: null 12 info lifecycle google-drive-copy-folder@6.0.3~build:prod: Failed to exec build:prod script 13 verbose stack Error: google-drive-copy-folder@6.0.3 build:prod: npm run webpack:prod && npm run gulp:prod 13 verbose stack Exit status 134 13 verbose stack at EventEmitter. (/usr/local/nvm/versions/node/v10.14.2/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16) 13 verbose stack at EventEmitter.emit (events.js:182:13) 13 verbose stack at ChildProcess. (/usr/local/nvm/versions/node/v10.14.2/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:182:13) 13 verbose stack at maybeClose (internal/child_process.js:962:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5) 14 verbose pkgid google-drive-copy-folder@6.0.3 15 verbose cwd /home/username/gdrive-copy 16 verbose Linux 4.14.83+ 17 verbose argv "/usr/local/nvm/versions/node/v10.14.2/bin/node" "/usr/local/nvm/versions/node/v10.14.2/bin/npm" "run" "build:prod" 18 verbose node v10.14.2 19 verbose npm v6.8.0 20 error code ELIFECYCLE 21 error errno 134 22 error google-drive-copy-folder@6.0.3 build:prod: npm run webpack:prod && npm run gulp:prod 22 error Exit status 134 23 error Failed at the google-drive-copy-folder@6.0.3 build:prod script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 134, true ]

If I copy what is currently in dist i get an error on line 3

TypeError: Expected argument of type object, but instead had type undefined. at unknown function

What is the expected behavior?

should set up script to be able to deploy to google scripts? I haven't made it that far so I don't know. I would like to be able to deploy this script on my own GSuite account, as I have a business account, and would like to see what I can edit so that I may extend out the limits that are currently imposed: I'm using your web apps store version right now, but it constantly stops at 5 minutes, and never resumes. I have to constantly manually resume the script. I am currently trying to migrate 1.8tb of data, so I'm also not sure if there is a file size limit, or if the script times out if a file is too large (largest files is about 30gb)

How would you reproduce the current behavior (if this is a bug)?

launch https://console.cloud.google.com/cloudshell/ create a shell (it's free) and use the console and editor the editor gives you access to your workspace file structure in the console run the commands specified by the For non-developers instructions

for deployment, I created a new script, made new files, using the names in dist, copied the script contents by opening the file highlighting all and pasting into the new script/html file.

Specify your

ericyd commented 5 years ago

I see that you are using Node v10

3 info using node@v10.14.2

Please use Node 8 as noted in the README. I'll update the how-to to be more accurate - currently it says Node v4 but actually v8 is better.