denoland / denoland/dnt

When generating a build, @deno/shim-deno-test/dist/test.js fails

Open
#210 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.3k
Forks
49
PR merge metrics
No merged PRs in 30d

Description

I am getting the following with dnt 0.30.0 (also tried 0.29.1):

```
Running tests in ./script/gustwind/npm/node_modules/@deno/shim-deno-test/dist/test.js...

Error: Cannot find module './definitions.js'
Require stack:
- /Users/juhovepsalainen/Projects/github/gustwindjs/gustwind/breezewind/npm/script/gustwind/npm/node_modules/@deno/shim-deno-test/dist/test.js
- /Users/juhovepsalainen/Projects/github/gustwindjs/gustwind/breezewind/npm/test_runner.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (/Users/juhovepsalainen/Projects/github/gustwindjs/gustwind/breezewind/npm/script/gustwind/npm/node_modules/@deno/shim-deno-test/dist/test.js:4:26)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/juhovepsalainen/Projects/github/gustwindjs/gustwind/breezewind/npm/script/gustwind/npm/node_modules/@deno/shim-deno-test/dist/test.js',
'/Users/juhovepsalainen/Projects/github/gustwindjs/gustwind/breezewind/npm/test_runner.js'
]
}
```

It's running tests for `@deno/shim-deno-test` but I don't understand why. I would expect it would run only the package tests.

To reproduce:

1. Clone https://github.com/gustwindjs/gustwind/tree/bug/dnt-test
2. `vr build:breezewind-for-npm 0.4.1`

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with `vr build:breezewind-for-npm 0.4.1` from the referenced gustwind `bug/dnt-test` branch. Start by inspecting the generated `@deno/shim-deno-test/dist/test.js` and `npm/test_runner.js`; done means the build runs only the package tests without the missing `./definitions.js` error.

Written by the indexing model from the issue text.

Assessment

Tech stack
deno, node.js
Domain
build-system, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.