Replies: 2 comments 2 replies
-
| 
         You cannot use $app in node. It only exists in a vite dev or build. For $lib you need a special node loader. Ts-paths-esm-loader is one. It translates the lib to imports node can understand  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            -
| 
         Not sure about all the SK-specific imports, but  kit/packages/kit/src/runtime/app/environment.js Lines 1 to 11 in 4ae8229  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm wondering if it's possible to open a node repl and have imports and all that work out with SvelteKit? Quite often in production I have to do one-off things that require either to be in a repl or to call a script that lives outside the web server but still needs access to things like
$lib/dbor$app, or$env/static/private. In my previous app I just usedrequireand relative paths, but that doesn't seem to work with SvelteKit.Beta Was this translation helpful? Give feedback.
All reactions