Nexe: Error: Cannot find module 'typescript'

Created on 6 Nov 2017  路  3Comments  路  Source: nexe/nexe

Building using
nexe index.js

Error: Cannot find module 'typescript'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at FileAnalysis.analyze (/Users/affan/.config/yarn/global/node_modules/fuse-box/dist/commonjs/analysis/FileAnalysis.js:101:24)
    at File.makeAnalysis (/Users/affan/.config/yarn/global/node_modules/fuse-box/dist/commonjs/core/File.js:230:23)
    at File.consume (/Users/affan/.config/yarn/global/node_modules/fuse-box/dist/commonjs/core/File.js:295:22)
    at ModuleCollection.<anonymous> (/Users/affan/.config/yarn/global/node_modules/fuse-box/dist/commonjs/core/ModuleCollection.js:192:28)
    at Generator.next (<anonymous>)
    at /Users/affan/.config/yarn/global/node_modules/fuse-box/dist/commonjs/core/ModuleCollection.js:7:71 code: 'MODULE_NOT_FOUND'

Does not crash the build, but is emitted in the beginning.
Running the compiled program emits:

Error: Cannot find module 'default/index.js'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)

However, building using: cat index.js | nexe works and the compiled program runs as expected.

Node: v8.9.0
nexe: v2.0.0-rc.17
Installed using yarn: v1.2.1

bug

Most helpful comment

Yeah, Installing typescript as a dev dependency should work for now. The current bundler is using it for transpilation

All 3 comments

Hi @affanshahid I'm going to roll this up into #418.... Sorry for the inconvenience

Any present workarounds?

Yeah, Installing typescript as a dev dependency should work for now. The current bundler is using it for transpilation

Was this page helpful?
0 / 5 - 0 ratings

Related issues

transitive-bullshit picture transitive-bullshit  路  6Comments

jgoux picture jgoux  路  5Comments

Arno500 picture Arno500  路  6Comments

ricardopolo picture ricardopolo  路  6Comments

nloomans picture nloomans  路  5Comments