Skip to content
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

Error: (SystemJS) [BABEL] unknown: Unknown option: direct.0 #7

Open
adriatic opened this issue Jan 30, 2017 · 9 comments
Open

Error: (SystemJS) [BABEL] unknown: Unknown option: direct.0 #7

adriatic opened this issue Jan 30, 2017 · 9 comments

Comments

@adriatic
Copy link
Member

Running gulp watch results with

Error: (SystemJS) [BABEL] unknown: Unknown option: direct.0
	ReferenceError: [BABEL] unknown: Unknown option: direct.0
	    at Logger.error (http://localhost:9000/jspm_packages/npm/[email protected]/browser.js:8955:11)
	    at OptionManager.mergeOptions (http://localhost:9000/jspm_packages/npm/[email protected]/browser.js:9463:29)
	    at OptionManager.init (http://localhost:9000/jspm_packages/npm/[email protected]/browser.js:9553:10)
	    at File.initOptions (http://localhost:9000/jspm_packages/npm/[email protected]/browser.js:8193:75)
	    at new File (http://localhost:9000/jspm_packages/npm/[email protected]/browser.js:8183:22)
	    at Pipeline.transform (http://localhost:9000/jspm_packages/npm/[email protected]/browser.js:13515:16)
	    at r (https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.4.0/bluebird.min.js:31:7722)
	    at r._settlePromiseFromHandler (https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.4.0/bluebird.min.js:30:13014)
	    at r._settlePromise (https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.4.0/bluebird.min.js:30:13817)
	    at r._settlePromise0 (https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.4.0/bluebird.min.js:30:14518)
	    at r._settlePromises (https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.4.0/bluebird.min.js:30:15848)
	    at r._drainQueue (https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.4.0/bluebird.min.js:29:3148)
	    at r._drainQueues (https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.4.0/bluebird.min.js:29:3209)
	    at drainQueues (https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.4.0/bluebird.min.js:29:1238)

@JeroenVinke: Googling for this message does not yield anything meaningful. Did you change the babel-core version recently? Why does this not happen to you?

@JeroenVinke
Copy link
Member

nope, we can't update babel-core since newer versions can only be run with JSPM 0.17. I cannot reproduce, did a git pull, npm install and jspm install then gulp watch and did not get that error :(

@adriatic
Copy link
Member Author

adriatic commented Jan 30, 2017

I checked the difference between the definition of the babel-core in current package.json (being "babel": "npm:babel-core@^5.6.4") and my old copy on my machine which requires "babel": "npm:babel-core@^5.8.24"

To my surprise both versions actually load the same version [email protected] - so I will try to run the old version and see whether that one works.

Experiment 1

Running my local copy (gulp watch) which identifies itself with Version 1.0.1 works fine. Note that I did not try to rebuild it.

Experiment 2

Rebuilding (I hid the node_modules and jspm_packages folder) and then running my local copy fails differently from my original report:

DEBUG [aurelia] Configured plugin aurelia-kendoui-bridge.
aurelia-logging-console.js:24 DEBUG [aurelia] Loading plugin aurelia-after-attached-plugin.
aurelia-logging-console.js:24 DEBUG [aurelia] Configured plugin aurelia-after-attached-plugin.
http://localhost:9000/jspm_packages/github/google/code-prettify@master/loader/run_prettify.js Failed to load resource: the server responded with a status of 404 (Not Found)
bluebird.min.js:29 Unhandled rejection Error: XHR error (404 Not Found) loading http://localhost:9000/jspm_packages/github/google/code-prettify@master/loader/run_prettify.js
    at o (http://localhost:9000/jspm_packages/system.js:4:12694)
    at XMLHttpRequest.I.s.onreadystatechange (http://localhost:9000/jspm_packages/system.js:4:13219)
D @ bluebird.min.js:29

I believe that I saw some of your interactions with a user (:point_up: January 30, 2017 4:57 AM), discussing prettify.js issues.

Note that both experiments 1 and 2, are run with the same configuration files (package_json and config.js), meaning that the issue is some cross interaction between run-time packages.

This strongly indicates the need to lock packages and maintain a list of such versions - once we debug this situation. It is also possible that versions of node and npm could affect this situation

I am using node version v7.3.0 and npm 4.0.5

@Thanood
Copy link

Thanood commented Jan 31, 2017

I guess we shouldn't pull packages from @master. 😃
In the case of code-prettify removing "loader" from the (only) import in the bridge app should remove the error.

@JeroenVinke
Copy link
Member

Yeah, unfortunately code-prettify does not have versions, but I believe JSPM supports commit hashes as well so that should work

@adriatic
Copy link
Member Author

@Thanood writes

I guess we shouldn't pull packages from @master

So, now, I am guessing that this comment references the line below

http://localhost:9000/jspm_packages/github/google/code-prettify@master/loader/run_prettify.js Failed to load resource: the server responded with a status of 404 (Not Found)

meaning that sometime ago Google changed this url. @JeroenVinke writes about commit hashes which I believe is a poor man's replacemement for version numbers.

My question is simple: what is the URL that I should be using?

@NajiJzr
Copy link

NajiJzr commented Feb 27, 2018

Hey guys, I'm having this error after updating my node version from v0.12.18 to v6.9.1. Any news about how to fix this ??

@JeroenVinke
Copy link
Member

@NajiJzr if you can reproduce this in a project that you can share we can have a look

@adriatic
Copy link
Member Author

adriatic commented Mar 1, 2018

@JeroenVinke you are likely aware of GitHub's strengthening the version support - this is a typical example:

image
which appears at several places in KendUI catalog app. While such detection seemingly uses the package-lock.json file to detect these issue, I would prefer to deal with this the proper way instead of just deleting package-lock.json files everywhere 👎.

As a person with sympathy for your workload, I am offering to do such cleanup - let me know if that is OK to do.

@JeroenVinke
Copy link
Member

Of course 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants