Comments (5)
Have you ever tried debug it yourself? For example test it in Chrome to reproduce it?
from av-ts.
I've tried, yes - but it gave even less useful results.
In Chrome (Chromium in my case) and electron, no tests even got executed - the task just fails with code 1:
Finished in 0.004 secs / 0 secs @ 10:27:09 GMT+0200 (CEST)
SUMMARY:
✔ 0 tests completed
=============================== Coverage summary ===============================
Statements : 100% ( 0/0 )
Branches : 100% ( 0/0 )
Functions : 100% ( 0/0 )
Lines : 100% ( 0/0 )
================================================================================
10 07 2017 10:27:09.783:DEBUG [karma]: Run complete, exiting.
10 07 2017 10:27:09.784:DEBUG [launcher]: Disconnecting all browsers
10 07 2017 10:27:09.791:DEBUG [coverage]: Writing coverage to /home/linne/Projects/vue-ts-playground/test-results/coverage
10 07 2017 10:27:09.855:DEBUG [reporter.junit]: JUnit results written to "/home/linne/Projects/vue-ts-playground/test-results/junit/TESTS-Chromium_58.0.3029_(Ubuntu_0.0.0).xml".
10 07 2017 10:27:09.887:DEBUG [launcher]: Process Chromium exited with code 0
10 07 2017 10:27:09.887:DEBUG [temp-dir]: Cleaning temp dir /tmp/karma-29324556
10 07 2017 10:27:09.901:DEBUG [launcher]: Finished all browsers
error Command failed with exit code 1.
The only message I could pick up from the browser console was this:
Refused to execute script from 'http://localhost:9876/base/index.ts' because its MIME type ('video/mp2t') is not executable.
Which seems to be quite reasonable - considering that the preprocessor failed before (as the message from phantomjs mentioned), the browser attempts to load something it cannot deal with, and refuses to go ahead.
The same happens in firefox.
Considering the error message from phantomjs, it seems to have something to do with the decorate
function from the Component
decorator, which was changed since 0.7.2 in this commit.
I'm a bit confused here - the content from the npm package of 0.8.2 does not seem to match the source.
The core.js in the package looks like this:
function decorate(cls) {
Component.inDefinition = true;
cls.prototype._init = util_1.NOOP;
var instance = null;
try {
instance = new cls();
}
finally {
Component.inDefinition = false;
}
delete cls.prototype._init;
var proto = cls.prototype;
var options = makeOptionsFromMeta(meta, cls['name']);
var _a = getKeys(proto), internalKeys = _a.internalKeys, normalKeys = _a.normalKeys;
for (var _i = 0, internalKeys_1 = internalKeys; _i < internalKeys_1.length; _i++) {
var protoKey = internalKeys_1[_i];
collectInternalProp(protoKey, proto, instance, options);
}
for (var _b = 0, normalKeys_1 = normalKeys; _b < normalKeys_1.length; _b++) {
var protoKey = normalKeys_1[_b];
collectMethodsAndComputed(protoKey, proto, options);
}
// everything on instance is packed into data
collectData(cls, Object.keys(instance), options);
var Super = findSuper(proto);
return Super.extend(options);
}
While the source code (since the referenced change) performs some more steps after the findSuper
line.
As I mentioned, the tests executed fine with 0.7.2., and 0.8.2 still works for and both for dev and build tasks. I'm not sure where to go ahead from here.
from av-ts.
The error stack is unreadable.
Please consider finding out some meaningful error message.
The possible cause is adding static methods to constructor. But I cannot reproduce. You can try delete those lines in node_module.
from av-ts.
This is phantom specific bug. Assigning arguments
and caller
will cause, well, a TypeError
without any useful information.
I won't fix it for a platform where the author has abdicated maintenance.
from av-ts.
Hm... sounds reasonable. I've debugged things down a bit and was wondering why both cls['arguments']
and ret['arguments']
raised a TypeError
here. I'm not the biggest fan of Phantomjs, just picked it up because it was mentioned as "recommended" in the vue template.
I'll try to go with Electron in this case, or give Jest a shot.
Anyway, thanks for taking a closer look at this issue!
from av-ts.
Related Issues (20)
- Static class properties are undefined HOT 2
- howto no data props - question HOT 4
- Lifecycle methods give error TS1241 HOT 3
- @Component decorator requires `template` key HOT 3
- Compiler error watching nested optional value HOT 2
- p({type: String}) doesn't work as expected HOT 1
- Try to improve `p` definition. HOT 1
- Some webpack related issue started from v0.8.0 HOT 2
- TypeError: 'caller' and 'arguments' are restricted function properties and cannot be accessed in this context. HOT 2
- @Lifecycle problem HOT 1
- Mixin type definition seems broken in ts 2.4 HOT 5
- Anything has to do to work with Vue 2.5? HOT 2
- @Data throws TS2345 about "Dict" when "strict: true" HOT 3
- Support `next(false)` in `beforeRouteEnter`
- how to write mapState function in vuex?? HOT 3
- TS3.0 introduced generic rest parameters HOT 3
- @Watch('value') warning: Argument type 'value' is not assignable to [string,string,string,string] HOT 1
- Is project alive? HOT 1
- Props throw `TypeError: Cannot redefine property: xxx` (with workaround) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from av-ts.