-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Linking failure in asm? #8
Comments
Hm I don't see that error myself. Would you be able to provide a minimal reproduction? |
I see it all the time running boost tests https://github.com/milesj/boost |
same for me, because of react-pdf dependency - diegomura/react-pdf#603 |
Hey @milesj, I've came to a conclusion that it has something to do with the way your testing (or project) is set up. Here's why. Node.js v12 supportInk's own tests run in both 10.x and 12.x versions of Node.js and no such warning is logged to the console. Also, while it's true that To double check this I pushed https://github.com/vadimdemedes/yoga-layout-prebuilt/tree/node12 branch with support for building this project in Node.js v12.x and the resulting code still caused the same warning. Jest?I noticed that both The root causeThen, I started gradually removing code from import React, { useContext } from 'react';
import { Box, Text } from 'ink';
import Command from '../src/Command';
class BoostCommand extends Command {
static description = 'Description';
static path = 'boost';
static allowUnknownOptions = true;
static allowVariadicParams = true;
run() {
return Promise.resolve();
}
}
test('x', () => {
expect(true).toEqual(true)
}) After import React, { useContext } from 'react';
import { Box, Text } from 'ink';
- import Command from '../src/Command'; Then comes the weird part, which made me think it could be something in Jest or its setup. I copied the same code with const React = require('react');
const { Box, Text } = require('ink');
const Command = require('./lib/Command').default
class BoostCommand extends Command {
static description = 'Description';
static path = 'boost';
static allowUnknownOptions = true;
static allowVariadicParams = true;
run() {
return Promise.resolve();
}
} Now no error, even though |
Oh wow, that's some nice detective work, thank you. I'll see what I can come up with. |
So I'm finally looking into this a bit and was able to reduce the import React from 'react';
import { Help } from './components/Help';
export default class Command {
renderHelp(): React.ReactElement {
const metadata = this.getMetadata();
return (
<Help
categories={metadata.categories}
config={metadata}
header={metadata.path}
options={metadata.options}
params={metadata.params}
/>
);
}
} Removing the |
Ok so I reduced import React from 'react';
import { Box } from 'ink';
export interface HelpProps {}
export class Help extends React.Component<HelpProps> {
render() {
return <Box flexDirection="column"></Box>;
}
} Even tried a function component and the problem persists. import React from 'react';
export function Help() {
return <Box flexDirection="column"></Box>;
} However, removing the import React from 'react';
import { Box } from 'ink';
export function Help() {
return <Box flexDirection="column"></Box>;
} Here's the PR I'm debugging with milesj/boost#125 |
Also found out that this doesn't trigger the warning:
But this does:
I think it may be because the built files are using var Box_1 = require("./components/Box");
Object.defineProperty(exports, "Box", { enumerable: true, get: function () { return Box_1.default; } });
var Text_1 = require("./components/Text");
Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return Text_1.default; } }); |
Warning stills shows on Node 14, but looks like we can trace it now. This is the output.
And the jest-runtime to trace: https://gist.github.com/milesj/5fa74043d405c56826750bbe3721b932 Nothing stands out so far in this file, but I can verify that it's requiring the actual module and not a mock. |
Seems to be no progress on this issue, so I'm at a dead end here. facebook/yoga#898 Saw this notice, but is yoga being built for node and not the browser? https://github.com/facebook/yoga#build-platforms |
Just stumbled upon this too: yarnpkg/berry#2176 Seems to be more widespread than initially thought. |
Our problem in yarnpkg/berry#2176 is different; the Yoga build includes an annoying listener on |
👍 |
Thanks for raising this issue @milesj. I've been seeing these errors as well but just tried to avoid looking into this.
All my CI runs contain this error: https://github.com/AriPerkkio/eslint-remote-tester/runs/1723287334?check_suite_focus=true I recently tried
|
facebook/yoga#898 (comment) This issue was closed and passed to this repo. |
@vadimdemedes After upgrading to Node 12 (12.16.1), this warning pops up all the time in my cli, usually when running tests (I'm using ink). This doesn't happen in Node 10.
The text was updated successfully, but these errors were encountered: