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

Some features are missing in features list if caniuse-db is at the same level in node_modules #32

Closed
MoOx opened this issue May 29, 2015 · 13 comments
Labels

Comments

@MoOx
Copy link
Collaborator

MoOx commented May 29, 2015

https://travis-ci.org/cssnext/cssnext/builds/64634160

I get the issue locally too with another one name. I checked my features.json and there is a lot missing.

@MoOx MoOx added the bug label May 29, 2015
@MoOx
Copy link
Collaborator Author

MoOx commented May 29, 2015

Ok got it. Since caniuse-db can be downloaded at the same time as caniuse-api if caniuse-db is installed beside caniuse-api, you can get a pretty short list like

[ 'ambient-light',
'atob-btoa',
'audio-api',
'audio',
'audiotracks',
'autofocus',
'background-attachment',
'background-img-opts',
'battery-status',
'blobbuilder',
'bloburls',
'border-image',
'border-radius',
'broadcastchannel',
'calc',
'canvas-blending',
'canvas-text',
'canvas',
'channel-messaging',
'classlist',
'clipboard',
'iframe-sandbox' ]

Which is clearly not enough.
Not sure how to fix that...

@MoOx
Copy link
Collaborator Author

MoOx commented May 29, 2015

That happen if you have caniuse-db & caniuse-api at the same level (eg: both as dep in package.json)

@MoOx MoOx changed the title Some features are missing in features.js Some features are missing in features list if caniuse-db is at the same level in node_modules May 29, 2015
@onigoetz
Copy link

onigoetz commented Apr 4, 2016

Hi, Is there any lead to fix this ?
because with npm3 it's automatically at the same level ...

This causes a lot of trouble in my builds both with npm2 and npm3

@onigoetz
Copy link

onigoetz commented Apr 4, 2016

Maybe you could embed caniuse-db using bundledDependencies ?

Other projects do this as well like fsevents/fsevents#123

This would solve this problem once and for all, and I think many other problems open on caniuse-api (like #36, #29 and maybe #39 )

@MoOx
Copy link
Collaborator Author

MoOx commented Apr 4, 2016

The idea was to NOT have caniuse-db in this package so you handle the version/update yourself.

Maybe we need to wait for caniuse-db to be downloaded entierly...

@onigoetz
Copy link

onigoetz commented Apr 4, 2016

yeah sure, I understand that tying the version to caniuse-db is not a good solution.

but a randomly failing build seems worse IMHO.

How could we wait for the download to finish ?

@MoOx
Copy link
Collaborator Author

MoOx commented Apr 4, 2016

How could we wait for the download to finish ?

Well caniuse-db is in dependencies (but with caret range), so should be downloaded before caniuse-api execute postinstall...
Not sure how to trace the origin of the issue.

The generation is causing so much trouble. I will make this optional as it is for in browser usage (eg: browserify don't like dynamic require).

@onigoetz
Copy link

onigoetz commented Apr 4, 2016

What do you mean by "I will make this optional as it is for in browser usage" ?

Actually, it seems that this was fixed in npm/npm#6926 but only for npm@3

@onigoetz
Copy link

onigoetz commented Apr 4, 2016

@MoOx
Copy link
Collaborator Author

MoOx commented Apr 4, 2016

Are you using npm@2?

@onigoetz
Copy link

Yes, in some projects it's npm2

@ankurp
Copy link

ankurp commented Aug 8, 2016

@MoOx Is there a fix for this or can https://github.com/MoOx/postcss-cssnext not use this module as this is failing for me too.

@MoOx
Copy link
Collaborator Author

MoOx commented Sep 5, 2016

Closed by #47

@MoOx MoOx closed this as completed Sep 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants