question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with the 'ts' task in gulpfile

See original GitHub issue

I excluded the 'ts' task from the default gulp task, it was breaking the build: https://github.com/limonte/sweetalert2/commit/77c6f65f3993a19c792bb58389b6578d1710f2d3

image

@toverux is that okay?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
toveruxcommented, Nov 22, 2017

Hm, I think that this is due to how Node-style module resolution works in general. Found this in TS docs by searching “node module resolution” in Google:

Node will look for your modules in special folders named node_modules. A node_modules folder can be on the same level as the current file, or higher up in the directory chain. Node will walk up the directory chain, looking through each node_modules until it finds the module you tried to load.

Node resolution doesn’t magically know where your project root is. That’s why it traverses the filesystem from the file to the root. I think that TS does the same thing here for some reason, so - it’s likely a normal behaviour.

1reaction
toveruxcommented, Nov 21, 2017

Strange! I can’t reproduce (even after reinstalling all the devdeps) 😕 What surprises me the most is that the task explores that /home/limon/node_modules directory (the paths in red). What’s that directory exactly?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Gulp - TypeScript
This quick start guide will teach you how to build TypeScript with gulp and then add Browserify, terser, or Watchify to the gulp...
Read more >
How can I run gulp with a typescript file - Stack Overflow
1. Manually transpile the typescript gulp file into js, then 2. Call gulp <some-task-name> But that doesn't seem optimal.
Read more >
Create a gulpfile and write gulp tasks using TypeScript - Medium
We need to compile our gulpfile.ts to the gulpfile.js using typescript compiler. That is a solution. But what if typescript compilation is a ......
Read more >
Task Runner Explorer doesn't load Gulp tasks
The issue was gulp itself, when migrating from VS2017 to VS2019 it didn't take any setting over. So the external node paths were...
Read more >
task() - gulp.js
task ()#. Reminder: This API isn't the recommended pattern anymore - export your tasks. Defines a task within the task system. The task...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found