GithubHelp home page GithubHelp logo

Comments (11)

6matko avatar 6matko commented on May 5, 2024 5

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.

ilazarte avatar ilazarte commented on May 5, 2024 2

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.

dngsdk avatar dngsdk commented on May 5, 2024 1

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.

bitjson avatar bitjson commented on May 5, 2024

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.

Markosyan-AR avatar Markosyan-AR commented on May 5, 2024

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.

mitch-b avatar mitch-b commented on May 5, 2024

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.

mitch-b avatar mitch-b commented on May 5, 2024

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.

hiteshdua1 avatar hiteshdua1 commented on May 5, 2024

HI, Still facing this issue, Any update on this ?

from typescript-starter.

mitch-b avatar mitch-b commented on May 5, 2024

@hiteshdua1 - can you try using changes offered in PR by asmagin?

https://github.com/bitjson/typescript-starter/pull/48/files

from typescript-starter.

hiteshdua1 avatar hiteshdua1 commented on May 5, 2024

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.

bitjson avatar bitjson commented on May 5, 2024

Fixed in #48. Thanks @asmagin!

from typescript-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.