Skip to content
This repository has been archived by the owner on May 31, 2020. It is now read-only.

./stdlib is not present in '../pybee/batavia/batavia' #683

Open
4 tasks
parthpahariya opened this issue Nov 7, 2017 · 8 comments
Open
4 tasks

./stdlib is not present in '../pybee/batavia/batavia' #683

parthpahariya opened this issue Nov 7, 2017 · 8 comments

Comments

@parthpahariya
Copy link

parthpahariya commented Nov 7, 2017

Expected Behavior

Current Behavior

ERROR in ./batavia/batavia.js
Module not found: Error: Can't resolve './stdlib' in '/home/parth/pybee/batavia/batavia'
@ ./batavia/batavia.js 21:20-39

ERROR in ./batavia/builtins/import.js
Module not found: Error: Can't resolve '../stdlib' in '/home/parth/pybee/batavia/batavia/builtins'
@ ./batavia/builtins/import.js 72:25-45
@ ./batavia/builtins.js
@ ./batavia/batavia.js

Steps to reproduce

Your Environment

  • Python Version (list the specific version number)

  • Operating System and Version (select from the following and list the specific version number; if your OS is not listed, list that as well)

    • OSX
    • Linux
    • Windows
    • Ubuntu
@glasnt
Copy link
Member

glasnt commented Nov 7, 2017

Hi @parthpahariya, this file is generated in the npm run build step of the quickstart.

Try running through all the steps https://github.com/pybee/batavia#quick-start and see if you can get it working.

Thanks!

@parthpahariya
Copy link
Author

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

while doing "npm install"

@jedie
Copy link

jedie commented Mar 14, 2018

I ran into the same Problem:

...
+ npm run build
...

ERROR in ./batavia/batavia.js
Module not found: Error: Can't resolve './stdlib' in '/root/pybee/batavia/batavia'
 @ ./batavia/batavia.js 21:20-39

ERROR in ./batavia/builtins/__import__.js
Module not found: Error: Can't resolve '../stdlib' in '/root/pybee/batavia/batavia/builtins'

I'm trying to run the quickstart tutorial via docker.

The Dockerfile is here: https://github.com/jedie/batavia-docker/blob/master/Dockerfile

The full output is here: https://travis-ci.org/jedie/batavia-docker/builds/353335832#L1118-L1123

@freakboy3742
Copy link
Member

The issue is probably due to a failure during npm install.

Log line 1086 looks like the only manifestation of that; the compile_stdlib step hasn't executed due to some sort of problem with the working directory. I can't say I've seen that particular error before, though.

@jedie
Copy link

jedie commented Mar 15, 2018

Hm. You mean:

npm WARN lifecycle @pybee/[email protected]~prepare: cannot run in wd %s %s (wd=%s) @pybee/[email protected] python compile_stdlib.py /root/pybee/batavia

Any idea what i can do to figure out the real problem?

@freakboy3742
Copy link
Member

Not a clue, sorry. At a guess, I'd say it's something to do with Docker's filesystem protection layer, but I'd need to dig into this to debug it any further.

@Badal1234
Copy link

This is due to the error in compile of '/batavia-dev/batavia/compile_stdlib.py' file.
Do:
$cd batavia-dev
$cd batavia
$ sudo python3 compile_stdlib.py

@freakboy3742
Copy link
Member

@Badal1234 No. You DO NOT need to use sudo to build or run any part of BeeWare.

sudo is not a magic "make it work" command. It's a highly dangerous security control granting root access to your operating system. There are legitimate reasons to use it - this is not one of them.

Before using sudo, you should have a good understanding of what it is you are giving permissions to, and why that tool needs those permissions. In this case, there is no reason for Batavia to require root permissions. Batavia is entirely user-space code.

If you are seeing problems that are "fixed" by using sudo, then I suspect you haven't followed the instructions provided in the tutorial - most likely, you are installing the code somewhere that you don't have permissions, or you aren't using a virtual environment.

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

No branches or pull requests

5 participants