haoliangyu/ngx-leaflet-starter

Module build failed: Error: ENOENT: no such file or directory, open '/leaflet/typings/index.d.ts'

HankBrown opened this issue · 1 comments

npm -v 3.8.9
node -v v6.1.0
typings -v 1.4.0
webpack -? 1.13.2


No errors or warnings for these...
git clone https://github.com/haoliangyu/angular2-leaflet-starter.git ./leaflet
cd ./leaflet/
 npm install
 typings install
 npm install typings --global

book15:leaflet hank$ webpack
ts-loader: Using typescript@1.8.10 and /Users/hank/home/hank/js/leaflet/tsconfig.json

WebpackCleanupPlugin: 0 file(s) deleted.
Hash: bed3a602e8119da4033d
Version: webpack 1.13.2
Time: 718ms
     Asset       Size  Chunks             Chunk Names
index.html  261 bytes          [emitted]
    + 2 hidden modules

ERROR in ./public_src/libs.ts
Module build failed: Error: ENOENT: no such file or directory, open '/Users/hank/home/hank/js/leaflet/typings/index.d.ts'
    at Error (native)
    at Object.fs.openSync (fs.js:634:18)
    at Object.fs.readFileSync (fs.js:502:33)
    at /Users/hank/home/hank/js/leaflet/node_modules/ts-loader/index.js:193:22
    at Array.forEach (native)
    at ensureTypeScriptInstance (/Users/hank/home/hank/js/leaflet/node_modules/ts-loader/index.js:190:17)
    at Object.loader (/Users/hank/home/hank/js/leaflet/node_modules/ts-loader/index.js:375:14)

ERROR in ./public_src/bootstrap.ts
Module build failed: TypeError: Cannot read property 'getEmitOutput' of null
    at Object.loader (/Users/hank/home/hank/js/leaflet/node_modules/ts-loader/index.js:410:33)
Child html-webpack-plugin for "index.html":
        + 3 hidden modules

Issue #5 asks "Did you install the type definition files by running tsd install? " But that is not part of the installation instructions? In any case I get "tsd not found".

There is more we need to know to get rolling here. I will see what I can learn about typings.

I have : /leaflet/public_src/typings/require.d.ts instead of "index.d.ts"

Solution: run "typings install"

Close as the problem is gone.