jonkemp / inline-css

Inline css into an html file.
MIT License
429 stars 84 forks source link

doesnt compile #83

Closed jayagupta7 closed 5 years ago

jayagupta7 commented 5 years ago

on installing, i try to start project, i get following compile errors:

Failed to compile.

./node_modules/pac-resolver/dnsResolve.js Module not found: Can't resolve 'dns' in '/Users/jayagupta/consumer-report-widget/node_modules/pac-resolver'

./node_modules/pac-resolver/isResolvable.js Module not found: Can't resolve 'dns' in '/Users/jayagupta/consumer-report-widget/node_modules/pac-resolver'

./node_modules/pac-resolver/isInNet.js Module not found: Can't resolve 'dns' in '/Users/jayagupta/consumer-report-widget/node_modules/pac-resolver'

./node_modules/socks-proxy-agent/index.js Module not found: Can't resolve 'dns' in '/Users/jayagupta/consumer-report-widget/node_modules/socks-proxy-agent'

./node_modules/ftp/lib/connection.js Module not found: Can't resolve 'fs' in '/Users/jayagupta/consumer-report-widget/node_modules/ftp/lib'

./node_modules/get-uri/file.js Module not found: Can't resolve 'fs' in '/Users/jayagupta/consumer-report-widget/node_modules/get-uri'

./node_modules/href-content/index.js Module not found: Can't resolve 'fs' in '/Users/jayagupta/consumer-report-widget/node_modules/href-content'

./node_modules/ftp/lib/connection.js Module not found: Can't resolve 'net' in '/Users/jayagupta/consumer-report-widget/node_modules/ftp/lib'

./node_modules/http-proxy-agent/index.js Module not found: Can't resolve 'net' in '/Users/jayagupta/consumer-report-widget/node_modules/http-proxy-agent'

./node_modules/https-proxy-agent/index.js Module not found: Can't resolve 'net' in '/Users/jayagupta/consumer-report-widget/node_modules/https-proxy-agent'

./node_modules/pac-proxy-agent/index.js Module not found: Can't resolve 'net' in '/Users/jayagupta/consumer-report-widget/node_modules/pac-proxy-agent'

./node_modules/pac-resolver/myIpAddress.js Module not found: Can't resolve 'net' in '/Users/jayagupta/consumer-report-widget/node_modules/pac-resolver'

./node_modules/socks/build/client/socksclient.js Module not found: Can't resolve 'net' in '/Users/jayagupta/consumer-report-widget/node_modules/socks/build/client'

./node_modules/ftp/lib/connection.js Module not found: Can't resolve 'tls' in '/Users/jayagupta/consumer-report-widget/node_modules/ftp/lib'

./node_modules/http-proxy-agent/index.js Module not found: Can't resolve 'tls' in '/Users/jayagupta/consumer-report-widget/node_modules/http-proxy-agent'

./node_modules/https-proxy-agent/index.js Module not found: Can't resolve 'tls' in '/Users/jayagupta/consumer-report-widget/node_modules/https-proxy-agent'

./node_modules/pac-proxy-agent/index.js Module not found: Can't resolve 'tls' in '/Users/jayagupta/consumer-report-widget/node_modules/pac-proxy-agent'

./node_modules/socks-proxy-agent/index.js Module not found: Can't resolve 'tls' in '/Users/jayagupta/consumer-report-widget/node_modules/socks-proxy-agent'

tmasrat commented 5 years ago

I ran into the same issue. I tired installing the modules one by one from bottom to top but I got stuck on dns. It requires a really old version of node and I am not going to downgrade node because other features will break.

jonkemp commented 5 years ago

What requires a really old version of node?

tmasrat commented 5 years ago

oh sorry I should have been more specific. dns does

jonkemp commented 5 years ago

What uses dns?

tmasrat commented 5 years ago

pac-resolve (refer to the above errors). All I did was install it and import it. I didn't even try to use it but it's breaking when I try to compile the app

jonkemp commented 5 years ago

Please try the latest version, just published tonight.

https://github.com/jonkemp/inline-css/releases/tag/v2.4.2

CXJoyce commented 4 years ago

I use the latest version 2.5.0. After i write "import inlineCss from 'inline-css';", it still have these errors.

maxdulieu commented 4 years ago

Same problem here with 2.5.1 on angular 8

yellow1912 commented 4 years ago

Yup same problem here, 1 year later.

I think you need to bump superagent : https://github.com/jonkemp/inline-css/blob/master/packages/remote-content/package.json

yellow1912 commented 4 years ago

I spoke too soon, the issue was yarn, I switched to pnpm and it works great.

Louis-Muzellec-ATS commented 3 years ago

I spoke too soon, the issue was yarn, I switched to pnpm and it works great.

Could you please elaborate what you did ? I'm using npm and I've encountered the same problem as above. I'm using the 3.0.0 release. (it doesn't work with 2.6.3 either) on angular 9.

Louis-Muzellec-ATS commented 3 years ago

The problem seems to be that inline-css doesn't work on the browser. Works perfectly fine server side.

wujekbogdan commented 3 years ago

I'm having the same issue. Just installed the 3.0.0 release and it doesn't seem to work in a browser.