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

No "exports" main defined #50

Open
1 of 4 tasks
jalvarezit opened this issue Jul 26, 2023 · 2 comments
Open
1 of 4 tasks

No "exports" main defined #50

jalvarezit opened this issue Jul 26, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@jalvarezit
Copy link

Describe the bug

When importing the module i get the following error:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /home/itasahobby/Documentos/OpenPwn/node_modules/@actions/workflow-parser/package.json
    at new NodeError (node:internal/errors:405:5)
    at exportsNotFound (node:internal/modules/esm/resolve:261:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:535:13)
    at resolveExports (node:internal/modules/cjs/loader:547:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:621:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1034:27)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/usr/local/lib/node_modules/ts-node/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at Function.Module._load (node:internal/modules/cjs/loader:901:27)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:119:18) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

To Reproduce
Steps to reproduce the behavior:

  1. npm init -y
  2. npm install '@actions/workflow-parser
  3. Create index.ts with the following:
import { NoOperationTraceWriter, parseWorkflow } from "@actions/workflow-parser";

var trace = new NoOperationTraceWriter();

const result = parseWorkflow(
    {
        name: "test.yaml",
        content: `on: push
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - run: echo 'hello'`
    },
    trace
);
  1. ts-node index.ts

Expected behavior
Program should work as expected.

Screenshots
image

Package/Area

  • Expressions
  • Workflow Parser
  • Language Service
  • Language Server

Package Version
v0.3.6"

Additional context
Versions:

  • node 20.5.0
  • ts-node 10.9.1
  • npm 9.8.0
  • Linux debia Debian 5.10.179-1
@m0un10
Copy link

m0un10 commented Aug 13, 2023

I'm also experiencing this issue.

@Smpse
Copy link

Smpse commented Dec 18, 2023

#50 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants