js2py.require('paper') => AssertionError: Could not link required node_modules
See original GitHub issuewhen I do (in the parent folder of node_modules) :
import js2py
js2py.require('paper')
Here is the error I get :
js2py.require('paper')
v6.11.2
La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\doom\AppData\Local\Programs\Python\Python35\lib\site-packages\js2py\node_import.py", line 46, in require
_init()
File "C:\Users\doom\AppData\Local\Programs\Python\Python35\lib\site-packages\js2py\node_import.py", line 13, in _init
assert subprocess.call('cd %s;npm install babel-core babel-cli babel-preset-es2015 babel-polyfill babelify browserify' % repr(DIRNAME), shell=True, cwd=DIRNAME)==0, 'Could not link required node_modules'
AssertionError: Could not link required node_modules
I have tried to install manually npm install babel-core babel-cli babel-preset-es2015 babel-polyfill babelify browserify
but I get the same error.
Have tried with another js lib (mustache and get same error)
Both js libs were installed with npm install paper mustache
OS : windows
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:7
Top Results From Across the Web
Js2Py - Could not link required node_modules - Bountysource
js2py.require('paper') => AssertionError: Could not link required node_modules. ... when I do (in the parent folder of node_modules) :
Read more >NodeJS on Python : AssertionError: Could not install the ...
i'm trying to run javascript on my python script and i got this error : Could not install the required module: fs. here...
Read more >AssertionError: Error when converting module to the js bundle ...
It seems that js2py can not be successfully applied to all kinds of npm package. ... AssertionError: Could not link required node_modules.
Read more >Js2Py - PyPI
Js2Py is able to translate and execute virtually any JavaScript code. Js2Py is written in pure python and does not have any dependencies....
Read more >how to convert python code to javascript Code Example
json requires tymon/jwt-auth ^0.5.12 -> satisfiable by tymon/jwt-auth[0.5.12]. ... ng has unexpectedly closed (exit code 127). ... psql: error: could not connect to ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
replaced into %Y:\or\python\path%\Lib\site-packages\js2py node_import.py to file into arch - work in windows https://1drv.ms/u/s!AgThWBJfRj69gvN_zJ7m_ta2KZQ6EA or insert inside Node_imprt this code:
@jomaldxbox After some time figuring out how to resolve this, I compared and mixed both @alex-pancho and @chaseSpace solutions. I`m no python expert (to be honest I recently started to code and study, so my apologies if I made some mistake about it), but I changed my site-packages/js2py/node_import.py file resulting on this code bellow. After that it worked fine 😃