Help

Non-declarative namespaces error

Topic Labels: Custom Extensions
2120 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Matt_Caruso
6 - Interface Innovator
6 - Interface Innovator

I’m working on getting my dev environment ready to start working on a custom block. However, I’m running into an error.

After running block run in Terminal and allowing my browser to load https://localhost:9000, opening the block in Airtable yields:

/usr/local/lib/node_modules/@airtable/blocks-cli/transpiled/src/builder/node_modules/yaml/index.d.ts: Namespace not marked type-only declare. Non-declarative namespaces are only supported experimentally in Babel. To enable and review caveats see: https://babeljs.io/docs/en/babel-plugin-transform-typescript
  107 |   str: scalarOptions.Str
  108 | }
> 109 | export namespace scalarOptions {
      |                  ^^^^^^^^^^^^^
  110 |   interface Binary {
  111 |     /**
  112 |      * The type of string literal used to stringify `!!binary` values.

Any ideas as to how to start troubleshooting this? Admittedly, I work more with Python and this is my first dive into Node development.

3 Replies 3

Hi!

Two things that might help narrow it down:

  1. What version of node are you using? node --version
  2. What packages (if any) have you add to the block? cat package.json
Matt_Caruso
6 - Interface Innovator
6 - Interface Innovator
  1. What version of node are you using? node --version
  2. What packages (if any) have you add to the block? cat package.json
  1. v14.4.0

  2. I haven’t done anything but start my block from the Hello World and Wikipedia examples — both yielded the same errors when I tried to run them. This is what I got as output:

    {
    “dependencies”: {
    @airtable/blocks”: “0.0.53”,
    “react”: “^16.13.0”,
    “react-dom”: “^16.13.0”
    },
    “devDependencies”: {
    “eslint”: “^6.8.0”,
    “eslint-plugin-react”: “^7.18.3”,
    “eslint-plugin-react-hooks”: “^2.5.0”
    },
    “scripts”: {
    “lint”: “eslint frontend”
    }
    }

Hi Matt,

It seems like there’s something a little weird going on with your blocks-cli package. The file from that error message doesn’t actually exist in the normal distribution of @airtable/blocks-cli. Could you try re-installing the cli tool to see if the error message changes?

npm uninstall --global @airtable/blocks-cli
rm -rf /usr/local/lib/node_modules/@airtable/blocks-cli
npm install --global @airtable/blocks-cli