Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Node? Netlify? Remix? #4358

Closed
pschaeffer opened this issue Mar 16, 2024 · 1 comment
Closed

Problem with Node? Netlify? Remix? #4358

pschaeffer opened this issue Mar 16, 2024 · 1 comment

Comments

@pschaeffer
Copy link

pschaeffer commented Mar 16, 2024

Details

I am getting an error when I try to run my application. I am not sure if this is a node error or Netlify error or a Remix error. See below. I get the error shown below. What does node:internal mean? I have no idea.

Function remix-server has returned an error: Invalid module "...uildserverserver.js" is not a valid package name imported from C:\Users\Peter\Documents\Visual_Studio_Code\Projects\WebApplication5\WebApplication5\my-remix-udemy-section3-netlify2\.netlify\functions-serve\.unzipped\remix-server\remix-server.mjs
TypeError: Invalid module "...uildserverserver.js" is not a valid package name imported from C:\Users\Peter\Documents\Visual_Studio_Code\Projects\WebApplication5\WebApplication5\my-remix-udemy-section3-netlify2\.netlify\functions-serve\.unzipped\remix-server\remix-server.mjs
    at new NodeError (node:internal/errors:406:5)
    at parsePackageName (node:internal/modules/esm/resolve:718:11)
    at packageResolve (node:internal/modules/esm/resolve:740:5)
    at moduleResolve (node:internal/modules/esm/resolve:838:20)
    at defaultResolve (node:internal/modules/esm/resolve:1043:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:228:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
    at link (node:internal/modules/esm/module_job:84:36)

Response with status 500 in 446 ms.

Node.js version

Not applicable.

Example code

import { default as default2 } from "....\buildserverserver.js";

// The import statement above was copied from below and this 
// comment was added to explain what I did 

import {createRequire as ___nfyCreateRequire} from "module";
import {fileURLToPath as ___nfyFileURLToPath} from "url";
import {dirname as ___nfyPathDirname} from "path";
let __filename=___nfyFileURLToPath(import.meta.url);
let      __dirname=___nfyPathDirname(___nfyFileURLToPath(import.meta.url));
let require=___nfyCreateRequire(import.meta.url);


// .netlify/functions-internal/remix-server.mjs
import { default as default2 } from "....\buildserverserver.js";
var config = {
  name: "Remix server handler",
  generator: "@netlify/remix-adapter@2.3.0",
  path: "/*",
  preferStatic: true
};
export {
  config,
  default2 as default
};

Operating system

Windows 10

Scope

I am using the netlify serve command under VSC.

Module and version

Not applicable.

@RedYetiDev
Copy link
Member

Hi, this seems like an issue with netlify or remix. node:internal refers to the internal workings of Node.js. Those files are in the /lib folder of the core repository (nodejs/core)

@RedYetiDev RedYetiDev closed this as not planned Won't fix, can't repro, duplicate, stale Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants