Skip to content
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

"TypeError: Cannot read property 'text' of undefined" during build #243

Open
YuriGal opened this issue Dec 11, 2020 · 1 comment
Open

"TypeError: Cannot read property 'text' of undefined" during build #243

YuriGal opened this issue Dec 11, 2020 · 1 comment

Comments

@YuriGal
Copy link

YuriGal commented Dec 11, 2020

I've upgraded my clockface project with SDK types (converted to Typescript). Now during build I am getting this error:

> [email protected] build /Users/ygalanter/Documents/Github Personal/Clean-Smart-Plus/clockfaces/pre-atlas
> fitbit-build

[09:43:05][error][app] TypeError: Cannot read property 'text' of undefined
    Details:
        code: PLUGIN_ERROR
        hook: transform
        id: /Users/ygalanter/Documents/Github Personal/Clean-Smart-Plus/clockfaces/pre-atlas/app/index.ts
        watchFiles: /Users/ygalanter/Documents/Github Personal/Clean-Smart-Plus/clockfaces/pre-atlas/app/index.ts

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `fitbit-build`
npm ERR! Exit status 1

It doesn't point to any line in my code and AFAIK all every element that uses .text property is defined.
clockface_project.zip

@SHaTRO
Copy link

SHaTRO commented Mar 4, 2021

I was seeing the same exact error, even with a relatively empty index.ts file.
This was resolved by not installing any "typescript" dev dependency and using the following tsconfig.json file at the top of the project:

{
  "extends": "./node_modules/@fitbit/sdk/sdk-tsconfig.json"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants