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

unable to identify the run file path #48

Open
RSS1102 opened this issue Feb 17, 2025 · 1 comment · May be fixed by #51
Open

unable to identify the run file path #48

RSS1102 opened this issue Feb 17, 2025 · 1 comment · May be fixed by #51
Assignees

Comments

@RSS1102
Copy link
Contributor

RSS1102 commented Feb 17, 2025

Image

changesets-changelog-github\packages\changesets-changelog-github\src> farmup main.ts
node:internal/errors:496
    ErrorCaptureStackTrace(err);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:405:5)
    at validateString (node:internal/validators:162:11)
    at Object.join (node:path:429:7)

version

farmup/0.1.5 (core: 1.6.6) win32-x64 node-v18.20.4
@shulandmimi shulandmimi self-assigned this Feb 17, 2025
@shulandmimi shulandmimi reopened this Feb 18, 2025
@RSS1102
Copy link
Contributor Author

RSS1102 commented Feb 18, 2025

[ Farmup:index.mjs ] node:internal/modules/esm/load:228
    throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(parsed, schemes);
          ^

Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
    at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:228:11)
    at defaultLoad (node:internal/modules/esm/load:110:3)
    at ModuleLoader.load (node:internal/modules/esm/loader:567:13)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:442:56)
    at new ModuleJob (node:internal/modules/esm/module_job:76:27)
    at #createModuleJob (node:internal/modules/esm/loader:455:17)
    at ModuleLoader.getJobFromResolveResult (node:internal/modules/esm/loader:266:34)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:247:17)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:481:25) {
  code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}

Node.js v22.6.0
  System:
    OS: Windows 11 10.0.26100
    CPU: (32) x64 AMD Ryzen 9 7940HX with Radeon Graphics        
    Memory: 6.42 GB / 15.22 GB
import { defineConfig } from '@farmfe/core';
import farmJsPluginDts from '@farmfe/js-plugin-dts';

export default defineConfig({
  compilation: {
    input: {
      index: './src/main.ts'
    },
    output: {
      path: 'dist',
      entryFilename: '[entryName].cjs',
      targetEnv: 'node',
      format: "esm" 
    },
    external: ['typescript'],
    partialBundling: {
      enforceResources: [
        {
          name: 'index.js',
          test: ['.+']
        }
      ]
    },
    minify: false,
    sourcemap: false,
    persistentCache: false,
    presetEnv: false
  },
  plugins:[farmJsPluginDts()]
});

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

Successfully merging a pull request may close this issue.

2 participants