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:
npm init -y
npm install '@actions/workflow-parser
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
);
ts-node index.ts
Expected behavior
Program should work as expected.
Describe the bug
When importing the module i get the following error:
To Reproduce Steps to reproduce the behavior:
npm init -y
Create
index.ts
with the following:ts-node index.ts
Expected behavior Program should work as expected.
Screenshots
Package/Area
Package Version
v0.3.6"
Additional context Versions: