Issues Setting Up Streamlit For Development

Hello,

I am new to Streamlit and am trying to get set up for development (contribution). I got stuck on an error, seemingly with the auto-generated files?

Building Streamlit apps works great for me, but the development server won’t start up.

I have been following the Contribution Guide. See this Dropbox Paper doc for a cleaner view of the terminal output.

Any help would be greatly appreciated!

My Steps:

Terminal 1 (Inside lib)

pipenv --three
pipenv shell

cd .. (now in streamlit)
make all-devel

Terminal 2 (Inside frontend)

yarn start


Failed to compile.

./src/assets/css/theme.scss (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-5-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--6-oneOf-5-3!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-5-4!./src/assets/css/theme.scss)

Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (83)



## Temporarily fix node-sass
yarn upgrade



yarn start


Failed to compile.

./src/App.tsx
Module not found: Can't resolve 'autogen/proto' in '{path}/streamlit/frontend/src'

Try to Refresh System (Terminal 2)

make init


Failed to compile.

./src/autogen/proto.js
Line 21:5:  Parsing error: 'import' and 'export' may only appear at the top level

  19 |     const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

  20 |

> 21 |     export const Alert = $root.Alert = (() => {

     |     ^

  22 |

  23 |         /**

  24 |          * Properties of an Alert.

Environment Information:

  • MacOS Catalina (10.15)
  • Python 3.7.3
  • Pip 20.1.1
  • Streamlit 0.55.2
  • Pipenv 2020.6.2

Hi @wtype, welcome to the Streamlit community!

I’ll forward this on to our engineering team, who will hopefully be able to figure out the issue.

Best,
Randy

1 Like

Hi @wtype

Can you try this?

2 Likes

@thiago that worked great and makes sense. Thank you for the help!

For reference to others:

After running npm rebuild node-sass, if you get an error saying " No Xcode or CLT version detected" (even though you know it’s installed), follow these steps to remove and reinstall:

2 Likes

Edit: I got it to work on a different machine without any issues, so i suspect something doesnt play nicely with my original system. I dont really have an answer why this happend, so i guess this can be ignored.

I’m posting this here as I am facing the second problem OP posted when i try to set up Streamlit for Development, and i havent managed to overcome this yet.

I researched where this comes from to understand it, I checked the related autogen file that contains which seems correct:

/* eslint-disable */

.eslintrc contains:

“ignorePatterns”: [“src/autogen/*”],

Yet it seems to ignore the .eslintrc instructions. I dont have a .eslintrc at any higher level.

Help or pointers would be great. Thank you.

Environment Information:

  • Linux 20.04
  • Python 3.7.3
  • Pip 20.2.1
  • Pipenv 2020.6.2
  Line 21:5:  Parsing error: 'import' and 'export' may only appear at the top level

  19 |     const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
  20 |     
> 21 |     export const Alert = $root.Alert = (() => {
     |     ^
  22 |     
  23 |         /**
  24 |          * Properties of an Alert.