-
Notifications
You must be signed in to change notification settings - Fork 64
Description
After I install via npm install @tangramdotdev/tangram
and attempt to import using let tangram = require("@tangramdotdev/tangram")
and follow the remainder of the tutorial steps
I can run the script and get a working prediction as expected. However I am noticing some strange behaviors.
A) - Eslint is not happy with the import. It always gives me "Unable to resolve path to module '@tangramdotdev/tangram'.eslintimport/no-unresolved"
B) Even though the script will execute and work as expected, I can not test any function that imports the tangram library. Jest always throws the "Cannot find module '@tangramdotdev/tangram' from 'index.js' "
I've never observed this before in any other library. Any guidance? I've included some screenshots:
Working script: (Note the ESLINT error on import)

Ignore blocks at line 13 and 161 - Just some data marshalling / cleaning to get it in the right shape.
Working result: (after directly uncommenting line 177 in above image to run directly)

A simple jest test of above foo function:
const foo = require("./index")
test("foo", () => {
expect(foo()).toEqual({})
})
It's so baffling to me that I can run the script and all works as normal, but ESLINT and Jest are both throwing fits.
