Closed chonamkyu closed 1 year ago
I tested a new project using @mui/toolpad@0.1.6 and I can't reproduce. After upgrading existing project to 0.1.6, adding new serverside javascript is not failing with the above mentioned error, but I can't see anything in the function dropdown, although I have two functions in the functions.ts
file. The queries (functions) was correctly migrated. cc @Janpot
@chonamkyu Would you be able to share your project (github or package it up in a zip file)? I'd like to take a look. Additionally I'd love to know more about your windows version and Node.js version.
I can reproduce on Windows - looking into it.
Duplicates
Latest version
Steps to reproduce 🕹
TypeError [ERR_INVALID_MODULE_SPECIFIER]: Invalid module ".\toolpad\resources\functions.ts" is not a valid package name imported from C:\Users\nk\Documents\GitHub\toolpad016\toolpad.generated\functions\toolpad_main.js at new NodeError (node:internal/errors:399:5) at parsePackageName (node:internal/modules/esm/resolve:817:11) at packageResolve (node:internal/modules/esm/resolve:840:5) at moduleResolve (node:internal/modules/esm/resolve:938:20) at defaultResolve (node:internal/modules/esm/resolve:1153:11) at nextResolve (node:internal/modules/esm/loader:163:28) at ESMLoader.resolve (node:internal/modules/esm/loader:838:30) at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18) at ESMLoader.import (node:internal/modules/esm/loader:525:22) at importModuleDynamically (node:internal/modules/cjs/loader:1186:29) { code: 'ERR_INVALID_MODULE_SPECIFIER'
after I clicked serverside javascript, i got this error.
it worked in 0.1.3 (when its name was queries.ts) not from ^0.1.4(~0.1.5 same)
Current behavior 😯
load list of functions I made
Expected behavior 🤔
loaded list of functions I made
Context 🔦
I guess the problem is file structure for windows.
you may not able to access using dot(.) (ex .\toolpad)
Your environment 🌎
window 10