Open tqwewe opened 5 years ago
This is not a tsify problem. That package has no available @types
:
$ npm dist-tag ls @types/bandaged__bdapi
npm ERR! dist-tag ls Couldn't get dist-tag data for @types/bandaged__bdapi
npm ERR! code E404
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/-/package/@types%2fbandaged__bdapi/dist-tags
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Nicholas\AppData\Roaming\npm-cache\_logs\2019-01-10T12_12_53_795Z-debug.log
@cartant Sorry, that's a handwritten typo - It should be bandagedbd__bdapi
. In my TypeScript file it is correct, just in that code snippet I did a typo.
If you could re-open the issue for time being; would be much appreciated.
You should first verify that the import works with a plain vanilla .ts
file that's compiled using tsc
.
I.e. make sure that this compiles using tsc
:
import { BdApi } from 'bandagedbd__bdapi'
console.log(BdApi)
yep, unfortunately still doesn't work.
tsc
produces the main.js
file whilst node build2.js
does not.
I'm not going to have time to look into this anytime soon. You can, however, use the logging built into tsify to see if you can figure out why that particular package is problematic. See https://github.com/TypeStrong/tsify/blob/master/CONTRIBUTING.md#debugging
TSIFY 3228: + 0 file(s) found in node_module
This is a line I found from the log.
I am unable to import a module from a TypeScript @types package. In my main file I have:
This compiles correctly when I run
tsc
but not withnode build.js
.My tsconfig looks like this:
And my build.js file:
And my .babelrc
And the output when running
node build.js
I can
import * as React from 'react'
from@types/react
, but notimport { BdApi } from 'bandagedbd__bdapi'
.