Azure / Azure/azure-functions-core-tools

Importing SQL raw-loader module not found

Open
#2,343 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.5k
Forks
498
Avg merge
5d 4h
Merged PRs (30d)
15

Description

I have a simple issue when running `func` or `npm run start`.

in package.json I have
```
....
start: "func",
...
```

on my project file I have
```
...
import sqlInsert from 'foo.sql'; // this is a simple sql file
,,,
```

```
//foo.sql
SELECT * from Table;
```

When I `npm run start` it shows the following error.
`Exception: Worker was unable to load function GetDataProviderResponse: 'Error: Cannot find module 'foo.sql'`

Contributor guide

Open the contributing guide

Research direction

Start with the package.json start script and the function entry point that imports foo.sql. Reproduce the failure with npm run start and func, then trace the module-loading error to determine how this project handles .sql imports. Done means the documented or implemented behavior is clear and the function loads successfully in the reported setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, javascript, sql
Domain
backend, cli, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.