New issue
Advanced search Search tips

Issue 731519 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

Luci web presubmits broken

Project Member Reported by dsansome@chromium.org, Jun 9 2017

Issue description

I guess this depends on the version of something installed on my system?

Running presubmit commit checks ...

** Presubmit ERRORS **
web presubmit (1.01s) failed

/usr/local/google/home/dsansome/cr/i/infra/go/src/github.com/luci/luci-go/web/node_modules/gulp-debug/index.js:2
const path = require('path');
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/google/home/dsansome/cr/i/infra/go/src/github.com/luci/luci-go/web/apps/gulp-common.js:25:13)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
WARNING:web.py:Non-zero return code (8) from command.

 

Comment 1 by d...@chromium.org, Jun 9 2017

This works fine on my system and on builders. Please take the time and try to figure out what's not working, as I suspect this will be hard to reproduce.

Comment 2 by d...@chromium.org, Jun 9 2017

Owner: dsansome@chromium.org
Assigning to you for more details and some inspection. A clean run doesn't seem to reproduce this for me.

Comment 3 by d...@chromium.org, Jun 9 2017

Thinking more, can I get:
1) OS
2) "node.js" and "npm" paths ("which")?
3) Node and NPM version.

This is designed to use the Node in the Infra "go/env.py". If you're not in that, can you please install that in your shell and try again?
Owner: d...@chromium.org
I get a different error when running under Infra's go/env.py!

/usr/local/google/home/dsansome/cr/i/infra/go/src/github.com/luci/luci-go/web/node_modules/@types/es6-promise/index.d.ts(11,15): error TS2300: Duplicate identifier 'Promise'.
[16:41:02] 'check-ts' errored after 3.61 s
[16:41:02] TypeScript error: /usr/local/google/home/dsansome/cr/i/infra/go/src/github.com/luci/luci-go/web/node_modules/@types/es6-promise/index.d.ts(11,15): error TS2300: Duplicate identifier 'Promise'.
    at Object.getError (/usr/local/google/home/dsansome/cr/i/infra/go/src/github.com/luci/luci-go/web/node_modules/gulp-typescript/release/utils.js:55:15)
    at Output.getError (/usr/local/google/home/dsansome/cr/i/infra/go/src/github.com/luci/luci-go/web/node_modules/gulp-typescript/release/output.js:91:22)
    at Output.diagnostic (/usr/local/google/home/dsansome/cr/i/infra/go/src/github.com/luci/luci-go/web/node_modules/gulp-typescript/release/output.js:94:25)
    at ProjectCompiler.reportDiagnostics (/usr/local/google/home/dsansome/cr/i/infra/go/src/github.com/luci/luci-go/web/node_modules/gulp-typescript/release/compiler.js:130:33)
    at ProjectCompiler.inputDone (/usr/local/google/home/dsansome/cr/i/infra/go/src/github.com/luci/luci-go/web/node_modules/gulp-typescript/release/compiler.js:47:14)
    at CompileStream.end (/usr/local/google/home/dsansome/cr/i/infra/go/src/github.com/luci/luci-go/web/node_modules/gulp-typescript/release/project.js:126:31)
    at DestroyableTransform.onend (/usr/local/google/home/dsansome/cr/i/infra/go/src/github.com/luci/luci-go/web/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:523:10)
    at DestroyableTransform.g (events.js:292:16)
    at emitNone (events.js:91:20)
    at DestroyableTransform.emit (events.js:185:7)
/usr/local/google/home/dsansome/cr/i/infra/go/src/github.com/luci/luci-go/web/node_modules/@types/es6-promise/index.d.ts(42,19): error TS2300: Duplicate identifier 'Promise'.
/usr/local/google/home/dsansome/cr/i/infra/go/src/github.com/luci/luci-go/web/node_modules/typescript/lib/lib.es6.d.ts(1336,11): error TS2300: Duplicate identifier 'Promise'.
/usr/local/google/home/dsansome/cr/i/infra/go/src/github.com/luci/luci-go/web/node_modules/typescript/lib/lib.es6.d.ts(5072,11): error TS2300: Duplicate identifier 'Promise'.
/usr/local/google/home/dsansome/cr/i/infra/go/src/github.com/luci/luci-go/web/node_modules/typescript/lib/lib.es6.d.ts(5633,13): error TS2300: Duplicate identifier 'Promise'.
/usr/local/google/home/dsansome/cr/i/infra/go/src/github.com/luci/luci-go/web/node_modules/typescript/lib/lib.es6.d.ts(5860,11): error TS2300: Duplicate identifier 'Promise'.
[16:41:02] TypeScript: 6 semantic errors
[16:41:02] TypeScript: 6 emit errors
[16:41:02] TypeScript: emit failed
[16:41:02] WARNING: Files are not properly formatted. Please run
[16:41:02]   node_modules/gulp-clang-format/node_modules/clang-format/index.js -i -style="{"BasedOnStyle":"Google"}" /usr/local/google/home/dsansome/cr/i/infra/go/src/github.com/luci/luci-go/web/inc/logdog-stream-view/fetcher.ts /usr/local/google/home/dsansome/cr/i/infra/go/src/github.com/luci/luci-go/web/inc/logdog-stream-view/model.ts
[16:41:02]   (using clang-format version 1.0.48)
files not formattedWARNING:web.py:Non-zero return code (1) from command.

OS is Goobuntu 14.04.
node is infra/cipd/bin/node v6.10.3
npm is infra/cipd/bin/npm 3.10.10

Comment 5 by d...@chromium.org, Jun 9 2017

Owner: dsansome@chromium.org
Thanks for the details. I was able to reproduce locally on my Mac, and have created a fix that resolves the issue for me: https://codereview.chromium.org/2935473002

If you have time, could you please apply this and see if it works for you as well?
Project Member

Comment 6 by bugdroid1@chromium.org, Jun 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/external/github.com/luci/luci-go.git/+/e65d27b76fb791d6ee6e47c510fa9aa398557f2f

commit e65d27b76fb791d6ee6e47c510fa9aa398557f2f
Author: dnj <dnj@google.com>
Date: Fri Jun 09 17:29:53 2017

[web] Fix duplicate dep, strengthen provisioning.

Remove the unnecessary "es6-promise" polyfill from "package.json". This
became unnecessary when TypeScript was instructed to build with ES6.

Update "web.py" to purge existing Node/Bower directories when their deps
change, rather than just ensure them. We do this because we don't want
residual packages from previous specifications to still be importable.

BUG= chromium:731519 
TEST=local
  - Reproduced the failure in the bug.
  - Works with this patch.

Review-Url: https://codereview.chromium.org/2935473002

[modify] https://crrev.com/e65d27b76fb791d6ee6e47c510fa9aa398557f2f/web/apps/gulp-common.js
[modify] https://crrev.com/e65d27b76fb791d6ee6e47c510fa9aa398557f2f/web/package.json
[modify] https://crrev.com/e65d27b76fb791d6ee6e47c510fa9aa398557f2f/web/web.py

Comment 7 by d...@chromium.org, Jun 12 2017

Owner: d...@chromium.org
Status: Fixed (was: Assigned)
I'm going to close this as Fixed. Please re-open if you encounter the same problem, or open a new bug if you encounter a different one.
Thanks for the quick fix!

Sign in to add a comment