Skip to content

The "fetch" example does not seem to work as expected #26

Description

@doberkofler
perry --version
perry 0.5.15
perry compile src/fetch.ts
Collecting modules...
  JS module: axios -> /Users/doberkofler/MyShare/doberkofler/perry_example/node_modules/.pnpm/axios@1.15.0/node_modules/axios/index.js
Found 2 module(s): 1 native, 1 JavaScript
Generating code...

Module init order (0 modules):

Wrote object file: fetch_ts.o
  auto-optimize: Perry workspace source not found, using prebuilt libperry_runtime.a + libperry_stdlib.a
Generated JS bundle: ./__perry_js_bundle.js
Linking (runtime-only)...
Error: JavaScript modules found but libperry_jsruntime.a not found. Build it with: cargo build --release -p perry-jsruntime
./fetch
Status: undefined
undefined

src/fetch.ts:

import axios from 'axios';

// Native Rust implementation - no npm install needed
const response = await axios.get('https://api.example.com/data');

console.log(`Status: ${response.status}`);
console.log(response.data);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions