ionic3-seed-protractor icon indicating copy to clipboard operation
ionic3-seed-protractor copied to clipboard

Cannot find module 'tsconfig' when running npm run e2e

Open rajanshahsa opened this issue 6 years ago • 1 comments

  throw e;
                ^

Error: Cannot find module 'tsconfig'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/XXXXX/XXXXXX/XXXXX/SourceCode_ionic_testing/node_modules/ts-node/dist/index.js:23:18)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

I have tsconfig.json file in at /src folder as well as on root folder.

at /src/tsconfi.json

{
  "compileOnSave": false,
  "compilerOptions": {
    "declaration": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "module": "commonjs",
    "moduleResolution": "node",
    "outDir": "../dist/out-tsc-e2e",
    "sourceMap": true,
    "target": "es5",
    "typeRoots": [
      "../node_modules/@types"
    ]
  }
}```

at root:

{ "compilerOptions": { "allowSyntheticDefaultImports": true, "declaration": false, "emitDecoratorMetadata": true, "experimentalDecorators": true, "lib": [ "dom", "es2015" ], "module": "es2015", "moduleResolution": "node", "sourceMap": true, "target": "es5", "baseUrl": "./src", "paths": { "@app/env": [ "config/environment" ] } }, "include": [ "src//*.ts" ], "exclude": [ "node_modules", "src//.spec.ts", "src/**/tests/.ts" ], "compileOnSave": false, "atom": { "rewriteTsconfig": false } }


Please let me know whats wrong I am doing.

rajanshahsa avatar Sep 12 '18 06:09 rajanshahsa

Given the way you wrote the reference to your tsconfig, I must ask you:

Are you sure the module name is correct and equal to tsconfig.json?

fmsouza avatar Sep 12 '18 23:09 fmsouza