Comments (11)
Unfortunately, I have the same issue as @ilazarte and also on Win10. I am experiencing absolutely the same behavior and the same error traces.
from typescript-starter.
Closer! I got the stack trace at the bottom on the trash test step. Outputting the build\test directory at this point is:
C:\USERS\ILAZARTE\SRC\GITHUB\TYPESCRIPT-STARTER-LEARN\BUILD
├───browser
│ index.cjs.js
│ index.cjs.js.map
│ index.js
│ index.js.map
│
├───main
│ │ index.d.ts
│ │ index.js
│ │
│ ├───adapters
│ │ crypto.browser.d.ts
│ │ crypto.browser.js
│ │
│ └───lib
│ async.d.ts
│ async.js
│ async.spec.d.ts
│ async.spec.js
│ hash.d.ts
│ hash.js
│ hash.spec.d.ts
│ hash.spec.js
│ number.d.ts
│ number.js
│ number.spec.d.ts
│ number.spec.js
│
├───module
│ │ index.js
│ │
│ ├───adapters
│ │ crypto.browser.js
│ │
│ └───lib
│ async.js
│ async.spec.js
│ hash.js
│ hash.spec.js
│ number.js
│ number.spec.js
│
└───temp
hash.js
$ trash test && node config/exports/build-tests.js --no-browser
Done in 0.78s.
8:53:20 PM - Compilation complete. Watching for file changes.
module.js:327
throw err;
^
Error: Cannot find module 'build/main/index.js'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (C:\Users\ilazarte\src\github\typescript-starter-learn\src\lib\async.spec.ts:2:1)
at Module._compile (module.js:409:26)
at extensions.(anonymous function) (C:\Users\ilazarte\src\github\typescript-starter-learn\node_modules\require-precompiled\index.js:13:11)
at Object.require.extensions.(anonymous function) [as .js] (C:\Users\ilazarte\src\github\typescript-starter-learn\node_modules\ava\lib\process-adapter.js:105:4)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (C:\Users\ilazarte\src\github\typescript-starter-learn\node_modules\ava\lib\test-worker.js:33:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:974:3
module.js:327
throw err;
^
Error: Cannot find module 'build/main/index.js'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (C:\Users\ilazarte\src\github\typescript-starter-learn\src\lib\hash.spec.ts:2:1)
at Module._compile (module.js:409:26)
at extensions.(anonymous function) (C:\Users\ilazarte\src\github\typescript-starter-learn\node_modules\require-precompiled\index.js:13:11)
at Object.require.extensions.(anonymous function) [as .js] (C:\Users\ilazarte\src\github\typescript-starter-learn\node_modules\ava\lib\process-adapter.js:105:4)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (C:\Users\ilazarte\src\github\typescript-starter-learn\node_modules\ava\lib\test-worker.js:33:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:974:3
module.js:327
throw err;
^
Error: Cannot find module 'build/main/index.js'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (C:\Users\ilazarte\src\github\typescript-starter-learn\src\lib\number.spec.ts:2:1)
at Module._compile (module.js:409:26)
at extensions.(anonymous function) (C:\Users\ilazarte\src\github\typescript-starter-learn\node_modules\require-precompiled\index.js:13:11)
at Object.require.extensions.(anonymous function) [as .js] (C:\Users\ilazarte\src\github\typescript-starter-learn\node_modules\ava\lib\process-adapter.js:105:4)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (C:\Users\ilazarte\src\github\typescript-starter-learn\node_modules\ava\lib\test-worker.js:33:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:974:3
3 exceptions
× test\main\lib\async.spec.js exited with a non-zero exit code: 1
× test\main\lib\hash.spec.js exited with a non-zero exit code: 1
× test\main\lib\number.spec.js exited with a non-zero exit code: 1
from typescript-starter.
Replacing ' with \" in package.json on line 26 where "watch" is defined should do the trick.
Example:
"watch": "yarn build && yarn build:tests -- --no-browser && concurrently -r --kill-others \"npm run --silent build:main -- -w\" \"npm run --silent build:tests -- -w --no-browser\" \"sleepms 2000 && ava --watch\"",
from typescript-starter.
Hey @ilazarte and @dngsdk – thanks for sharing! @ilazarte, were you able to get this working?
Is there an issue with Windows 10 accepting strings in single quotes? (I don't have a great way of testing on Windows.)
I'd love to merge a pull request if one of you is willing to create it!
from typescript-starter.
I've replaced quotes, but it didn't helps
Using windows 10:
PS D:\DEV\JS\Typescript-hyped> yarn watch
yarn watch v0.27.5
$ yarn build && yarn build:tests -- --no-browser && concurrently -r --kill-others "npm run --silent build:main -- -w" "npm run --silent build:tests -- -w --no-browser" "sleepms 2000 && ava --watch"
Error: Command failed: D:\DEV\JS\Typescript-hyped\node_modules\trash\lib\win-trash.exe D:\DEV\JS\Typescript-hyped\build
at ChildProcess.exithandler (child_process.js:204:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:886:16)
at Socket.<anonymous> (internal/child_process.js:342:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:501:12)
error Command failed with exit code 1.
error Command failed with exit code 1.
from typescript-starter.
Sorry for the "me too" comment, but since this issue has been silent for a while -- does anyone have ideas on where to look? I'm willing to put time into it, but I'm completely new to most of these tools. Is this an issue in nyc
or ava
? I noticed running the following produces the same problem:
# mimicing call "nyc ava"
PS> node .\node_modules\nyc\bin\nyc.js .\node_modules\ava\cli.js
module.js:529
throw err;
^
Error: Cannot find module 'build/browser/index.cjs.js'
at Function.Module._resolveFilename (module.js:527:15)
at Function.Module._load (module.js:476:23)
from typescript-starter.
Turns out, it was a lot less nuanced than I originally guessed. Boiled down to a file path issue between using /
and \
separators. Hopefully PR #47 works for everyone!
from typescript-starter.
HI, Still facing this issue, Any update on this ?
from typescript-starter.
@hiteshdua1 - can you try using changes offered in PR by asmagin?
https://github.com/bitjson/typescript-starter/pull/48/files
from typescript-starter.
There were some errors initially , so I ran
yarn reset
then i updated the code as per pull request and It worked fine after that
from typescript-starter.
Fixed in #48. Thanks @asmagin!
from typescript-starter.
Related Issues (20)
- npm run watch does not work on node 12. node_modules/ava/index.d.ts:5:10 - error TS2339: Property 'observable' does not exist on type 'SymbolConstructor'. HOT 6
- How can I set up express server typescript-starter HOT 1
- An in-range update of codecov is breaking the build 🚨 HOT 4
- Project Status HOT 6
- node_modules/ava/index.d.ts:5:10 - error TS2339: Property 'observable' does not exist on type 'SymbolConstructor'. HOT 4
- Can't generate docs with circular type HOT 1
- AppVeyor breaks on Node.js v14 HOT 1
- Add support for a GitHub Actions test matrix
- Cannot find namespace 'WebAssembly' HOT 2
- error TS2307: Cannot find module './lib/hash' or its corresponding type declarations. HOT 1
- Cannot find types for node error when running `npm run watch:build` HOT 2
- error TS2688: Cannot find type definition file for 'node'. HOT 4
- How do I generate a nodejs application with this starter? HOT 2
- Why there is a dependency of @bitauth/libauth? HOT 2
- Unexpected end of JSON input Error HOT 1
- Peer dependency mismatch causes project creation to be broken
- The javascript module link redirects to "Laptoptalks..."
- Option to work with ESM (ES Module) only libraries like node-fetch
- `pnpm` support as package manager HOT 4
- @bitauth/libauth dependency in generated project
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typescript-starter.