Issue 1:
I'm behind a corporate firewall and have to have a .npmrc setup with a proxy and https-proxy.

There appears to be something in next@6.0.0 that tries to connect to npm on launch and seems to ignore my .npmrc proxy settings as I'm seeing what look like proxy problems when I start my next app in dev mode.

Expected Behavior

running yarn dev or npm run dev should bring up the server.

Current Behavior

λ yarn dev
yarn run v1.3.2
$ next
{ Error: connect ECONNREFUSED 151.101.0.162:443
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
address: '151.101.0.162',
port: 443 }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

n.b. this does not occur when using yarn build & yarn start.

Steps to Reproduce (for bugs)

This appears to affect all projects, but I used this one:

https://github.com/zeit/next.js/tree/canary/examples/hello-world

You need to be relying on a custom .npmrc with a proxy - everything is fine if you don't have a proxy.

Context

This has only broken since upgrading to next@6.0.0 - maybe related to update-check?

Your Environment

Tech
Version

next
6.0.0

node
8.9.1

OS
Windows 7 x64

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

When defining a variable with css outside of React class components there are no problems:

const backgroundImageStyle = css`
div {
background-color: red;
}
`;

class Dropdown extends Component {
render() {
return (
<div>
<style jsx>{backgroundImageStyle}</style>
</div>
);
}
}

export default Dropdown;

But when moving the style definition into render() like this, it doesn't work:

render() {
const backgroundImageStyle = css`
div {
background-color: red;
}
`;

return (
<div>
<style jsx>{backgroundImageStyle}</style>
</div>
);
}

It gives me this error message:

StyleSheet: `insertRule` accepts only strings.
Error: StyleSheet: `insertRule` accepts only strings.
at invariant (node_modules/styled-jsx/dist/lib/stylesheet.js:274:11)
at StyleSheet.insertRule (node_modules/styled-jsx/dist/lib/stylesheet.js:125:7)
at node_modules/styled-jsx/dist/stylesheet-registry.js:88:29
at Array.map (native)
at StyleSheetRegistry.add (node_modules/styled-jsx/dist/stylesheet-registry.js:87:27)
at JSXStyle.componentWillMount (node_modules/styled-jsx/dist/style.js:58:26)
at resolve (node_modules/react-dom/cjs/react-dom-server.node.development.js:2119:12)
at ReactDOMServerRenderer.render (node_modules/react-dom/cjs/react-dom-server.node.development.js:2260:22)
at ReactDOMServerRenderer.read (node_modules/react-dom/cjs/react-dom-server.node.development.js:2234:19)
at renderToString (node_modules/react-dom/cjs/react-dom-server.node.development.js:2501:25)

Why is that so and is there a way to fix this? The reason why I want to define the style within render() is because I want to modify it based on props coming in:

render() {
let backgroundImageStyle;
if (this.props.bgcolor) {
backgroundImageStyle = css`
div {
background-color: ${this.props.bgcolor};
}
`;
} else {
backgroundImageStyle = css`
div {
background-color: red;
}
`;
}

return (
<div>
<style jsx>{backgroundImageStyle}</style>
</div>
);
}