electron-userland / electron-compile

DEPRECATED: Electron supporting package to compile JS and CSS in Electron applications
1.01k stars 99 forks source link

Cannot find module './smain' #256

Closed SimoneTosato closed 7 years ago

SimoneTosato commented 7 years ago

I'm trying to convert my electron app to typescript, i've created this init.js file to launch my smain.ts

/*jshint esversion: 6*/
const path = require('path');
const appRoot = path.join(__dirname,'..','..');
require('electron-compile').init(path.join(appRoot,'app'),require.resolve('./smain'));

image Everything looks fine with my project directory but i keep getting Cannot find module './smain'. I still have to try this on linux and macos, only testing on windows 10 atm but i will update as soon as i try it

Windows 10 Electron-compile v6.4.1 Electron-compilers v5.9.0

SimoneTosato commented 7 years ago

solved removing the require.resolve and moving init.js in the same folder of smain