Giter Site home page Giter Site logo

Comments (4)

rsify avatar rsify commented on May 20, 2024

can't reproduce this myself unfortunately - does installing modules via jay work for you when behind the proxy?

$ jay
> require('lodash')

from jay.

jonathanr24 avatar jonathanr24 commented on May 20, 2024

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.

jonathanr24 avatar jonathanr24 commented on May 20, 2024

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.

jonathanr24 avatar jonathanr24 commented on May 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.