generator-gulp-angular icon indicating copy to clipboard operation
generator-gulp-angular copied to clipboard

Documentation (How it Works) not clear when choosing Typescript

Open olimungo opened this issue 9 years ago • 6 comments

Current text in documentation:

tsd:install is located in the gulp/tsd.js which is created only when choosing TypeScript. It will automatically download typings files for the dependency found in Bower with a popular library TSD

But there is no gulp/tsd.js file. And when running gulp serve, I was getting the error:

ERROR in ./src/app/index.module.ts
Module build failed: Error: ENOENT: no such file or directory, open '/Users/oliviermungo/Projects/WebApps/weddy4_typescript/weddy4/.tmp/typings/tsd.d.ts'
    at Error (native)

So, I installed tsd:

sudo npm install -g tsd

and ran:

tsd install

Which downloaded the requested files in the ./tmp/typings folder. After that, I could gulp serve succesffully.

Great work, great generator, BTW.

Olivier Mungo

olimungo avatar Nov 03 '15 20:11 olimungo

I have the same problem. Seems like the installation of the typescript definition files only works when tsd is installed globally. Maybe one have to change the install command in the generator.

if (this.props.jsPreprocessor.key === 'typescript') {
      this.spawnCommandSync('tsd', ['install', '-so']);
}

Maybe it is better to use tsd from the node_modules/.bin folder in the generated app.

4kochi avatar Nov 13 '15 12:11 4kochi

I ran into the same thing, glad to have found this issue.

galenmarchetti avatar Nov 16 '15 00:11 galenmarchetti

Yep, it's an oudated part of the documentation.

We extract recently tsd from the generator to use it as an external tool.

Swiip avatar Nov 18 '15 09:11 Swiip

@Swiip should I update the docs or are we solving the tsd issue as @4kochi described?

bx2 avatar Nov 19 '15 22:11 bx2

Like gulp and bower, tsd as now to be installed in global. It's what I seen in the TS community. I prefere to document that instead of trying some magic workaround.

Swiip avatar Nov 20 '15 07:11 Swiip

@Swiip If that's the decision, should the documentation be updated? This caught me off guard as well.

Are the locations it needs to be updated shown in a search for npm install -g?

rummik avatar Jan 18 '16 18:01 rummik