rubenf
rubenf14mo ago

Package.json for Bun action

Could you share what kind of package.json would solve your issue. Opening the whole package.json is too much of a security issue on cloud at the very least
5 Replies
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
rubenf
rubenf14mo ago
{ "dependencies": { "@fonoster/sdk": "^0.3.24" } }
Is exactly the package.json that we generate using the imports. Are you sure you do not get the same error by doing bun install with that package.json ? you would need to uncomment the first line though but yeah we cannot make the full package.json editable but we can make the dependencies settable by hand if necessary
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
djm
djm14mo ago
I ran into this today after updating (was working before update), I saw my Bun code had a mix of import and require, but changing all to import like so gets the same error:
import * as wmill from "windmill-client";

// const { DataFactoryManagementClient } = require("@azure/arm-datafactory");
// const { DefaultAzureCredential } = require("@azure/identity");
import {DataFactoryManagementClient} from "@azure/arm-datafactory";
import {DefaultAzureCredential} from "@azure/identity";

import { subDays } from 'date-fns';
import * as wmill from "windmill-client";

// const { DataFactoryManagementClient } = require("@azure/arm-datafactory");
// const { DefaultAzureCredential } = require("@azure/identity");
import {DataFactoryManagementClient} from "@azure/arm-datafactory";
import {DefaultAzureCredential} from "@azure/identity";

import { subDays } from 'date-fns';
This script has not been deployed successfully because of the following errors:

job 018a872b-c134-0491-9185-d003ec97463b on worker wk-c3b14eb0bd72-U3QWv (tag: bun)

100 | ranges[_key2] = arguments[_key2];
101 | }
102 |
103 | return ranges.reduce(function (result, range) {
104 | var validRange = semver.validRange(range);
105 | var validRanges = validRange.split(regex.whitespace);
^
TypeError: null is not an object (evaluating 'validRange.split')
at /tmp/windmill/cache/bun/semver-intersect@1.4.0/semver-intersect.js:105:26
at reduce (:1:20)
at expandRanges (/tmp/windmill/cache/bun/semver-intersect@1.4.0/semver-intersect.js:103:11)
at intersect (/tmp/windmill/cache/bun/semver-intersect@1.4.0/semver-intersect.js:128:13)
at reduce (:1:20)
at /tmp/windmill/wk-c3b14eb0bd72-U3QWv/018a872b-c134-0491-9185-d003ec97463b/build.ts:84:10
Non-zero exit status: 1
This script has not been deployed successfully because of the following errors:

job 018a872b-c134-0491-9185-d003ec97463b on worker wk-c3b14eb0bd72-U3QWv (tag: bun)

100 | ranges[_key2] = arguments[_key2];
101 | }
102 |
103 | return ranges.reduce(function (result, range) {
104 | var validRange = semver.validRange(range);
105 | var validRanges = validRange.split(regex.whitespace);
^
TypeError: null is not an object (evaluating 'validRange.split')
at /tmp/windmill/cache/bun/semver-intersect@1.4.0/semver-intersect.js:105:26
at reduce (:1:20)
at expandRanges (/tmp/windmill/cache/bun/semver-intersect@1.4.0/semver-intersect.js:103:11)
at intersect (/tmp/windmill/cache/bun/semver-intersect@1.4.0/semver-intersect.js:128:13)
at reduce (:1:20)
at /tmp/windmill/wk-c3b14eb0bd72-U3QWv/018a872b-c134-0491-9185-d003ec97463b/build.ts:84:10
Non-zero exit status: 1
Works fine via Script Editor test button, but on Deploy runs into that error
rubenf
rubenf14mo ago
@base_gravy @devessier fixed on latest