Comments (4)
can't reproduce this myself unfortunately - does installing modules via jay work for you when behind the proxy?
$ jay
> require('lodash')
from jay.
I am not surprised that you cannot reproduce this :) Interestingly, after changing absolutely nothing jay
is starting up right away now - no more hanging. Since I have started using jay
I have consistently been having these hangs. So i'm not sure what changed. Just yesterday this was taking 3 minutes.
I thought I could require modules. I had installed lodash
previously and it now loads fine from cache:
[email protected] imported from node_modules.
But maybe I had been off my network proxy when I loaded lodash the first time.
Now I cannot load any packages:
> require('ramda')
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Object.<anonymous> (C:\Users\jonathan\AppData\Roaming\nvm\v10.13.0\node_modules\jay-repl\dist\moduler.js:256:33)
at Generator.next (<anonymous>)
at fulfilled (C:\Users\jonathan\AppData\Roaming\nvm\v10.13.0\node_modules\jay-repl\dist\moduler.js:5:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
{ C:\Users\jonathan\AppData\Roaming\nvm\v10.13.0\node_modules\jay-repl\node_modules\resolve\lib\sync.js:76
throw err;
^
Error: Cannot find module 'ramda' from 'C:\Users\jonathan\AppData\Local\jay-repl-nodejs\Cache\packages\lib'
at Function.module.exports [as sync] (C:\Users\jonathan\AppData\Roaming\nvm\v10.13.0\node_modules\jay-repl\node_modules\resolve\lib\sync.js:74:15)
at _resolve (C:\Users\jonathan\AppData\Roaming\nvm\v10.13.0\node_modules\jay-repl\dist\moduler.js:177:44)
at _require (C:\Users\jonathan\AppData\Roaming\nvm\v10.13.0\node_modules\jay-repl\dist\moduler.js:191:39)
at evalmachine.<anonymous>:1:1
at Script.runInContext (vm.js:107:20)
at Object.<anonymous> (C:\Users\jonathan\AppData\Roaming\nvm\v10.13.0\node_modules\jay-repl\dist\eval.js:94:41)
at Generator.next (<anonymous>)
at C:\Users\jonathan\AppData\Roaming\nvm\v10.13.0\node_modules\jay-repl\dist\eval.js:7:71
at new Promise (<anonymous>)
at __awaiter (C:\Users\jonathan\AppData\Roaming\nvm\v10.13.0\node_modules\jay-repl\dist\eval.js:3:12) code: 'MODULE_NOT_FOUND' }
FYI, my C:\Users\jonathan\AppData\Local\jay-repl-nodejs\Cache\packages
directory is empty.
from jay.
I figured out the cause of the error I was getting when attempting to require un-cached packages. It turns out that npm
was unable to resolve my root CA file for my proxy. That was preventing me from even being able to run npm
:
> npm
Error: Unknown system error -214427238: Unknown system error -214427238, open 'D:\Development\ZscalerRootCertificate-2048-SHA256.crt'
TypeError: Cannot read property 'get' of undefined
at errorHandler (C:\Users\jonathan\AppData\Roaming\nvm\v10.13.0\node_modules\npm\lib\utils\error-handler.js:205:18)
at C:\Users\jonathan\AppData\Roaming\nvm\v10.13.0\node_modules\npm\bin\npm-cli.js:78:20
at cb (C:\Users\jonathan\AppData\Roaming\nvm\v10.13.0\node_modules\npm\lib\npm.js:228:22)
at C:\Users\jonathan\AppData\Roaming\nvm\v10.13.0\node_modules\npm\lib\npm.js:266:24
at C:\Users\jonathan\AppData\Roaming\nvm\v10.13.0\node_modules\npm\lib\config\core.js:83:7
at Array.forEach (<anonymous>)
at C:\Users\jonathan\AppData\Roaming\nvm\v10.13.0\node_modules\npm\lib\config\core.js:82:13
at f (C:\Users\jonathan\AppData\Roaming\nvm\v10.13.0\node_modules\npm\node_modules\once\once.js:25:25)
at finalize (C:\Users\jonathan\AppData\Roaming\nvm\v10.13.0\node_modules\npm\lib\config\core.js:189:14)
at Conf.afterCARead (C:\Users\jonathan\AppData\Roaming\nvm\v10.13.0\node_modules\npm\lib\config\load-cafile.js:14:14)
After fixing that I am now back to being able to require packages. And I can still run jay
quickly. It starts up right away now. I have no idea why the behavior suddenly changed.
from jay.
jay
is back to taking 3 minutes to start up. I can't explain why it started up quickly previously. Can you make the change above to disable npm's update notifier (or just stop displaying the npm version)?
from jay.
Related Issues (20)
- Support .exit HOT 1
- Support save context
- Add configuration option to disable pairing quotes and parenthesis pairing autocompletion
- Requiring built-in modules throws an error HOT 2
- Exit jay HOT 2
- Input is always `await`ed, even when not prepended by `await` HOT 1
- `jay --version` should display version information
- Error: Cannot find module 'fp-ts/lib/Either' (Linux, node 10) HOT 2
- Images broken in readme
- Feature Request: Allow usage via code
- Error: process.stdin.setRawMode does not exist
- Evaluating `new Promise` crashes the program
- Doing {{}} crashes the program
- Feature request: Provide smart suggestion by TypeScript .d.ts file
- Command history persistence HOT 3
- Multiline commands aren't supported HOT 2
- jay doesn't create its own cache directory HOT 2
- Throws when starting HOT 11
- autocomplete new definitions just typed HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jay.