Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript example not working #8

Closed
agat opened this issue Apr 15, 2021 · 3 comments
Closed

TypeScript example not working #8

agat opened this issue Apr 15, 2021 · 3 comments

Comments

@agat
Copy link

agat commented Apr 15, 2021

Hello, i have problems with latest version of this gulp plugin. And same problem with TypeScript example. All requires esbuild package.

MacOS Big Sur os. Here is output:

t0820@T0820 cn-frontend-test % cd /Users/t0820/Downloads/gulp-esbuild-master/examples/typescript/          
t0820@T0820 typescript % npm i
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.

added 357 packages, and audited 358 packages in 7s

7 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
t0820@T0820 typescript % npm run build

> build
> gulp build

Error: Cannot find module 'esbuild'
Require stack:
- /Users/t0820/Downloads/gulp-esbuild-master/examples/typescript/node_modules/gulp-esbuild/index.js
- /Users/t0820/Downloads/gulp-esbuild-master/examples/typescript/gulpfile.js
- /Users/t0820/Downloads/gulp-esbuild-master/examples/typescript/node_modules/gulp-cli/lib/shared/require-or-import.js
- /Users/t0820/Downloads/gulp-esbuild-master/examples/typescript/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js
- /Users/t0820/Downloads/gulp-esbuild-master/examples/typescript/node_modules/gulp-cli/index.js
- /Users/t0820/Downloads/gulp-esbuild-master/examples/typescript/node_modules/gulp/bin/gulp.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/Users/t0820/Downloads/gulp-esbuild-master/examples/typescript/node_modules/gulp-esbuild/index.js:2:17)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/t0820/Downloads/gulp-esbuild-master/examples/typescript/node_modules/gulp-esbuild/index.js',
    '/Users/t0820/Downloads/gulp-esbuild-master/examples/typescript/gulpfile.js',
    '/Users/t0820/Downloads/gulp-esbuild-master/examples/typescript/node_modules/gulp-cli/lib/shared/require-or-import.js',
    '/Users/t0820/Downloads/gulp-esbuild-master/examples/typescript/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js',
    '/Users/t0820/Downloads/gulp-esbuild-master/examples/typescript/node_modules/gulp-cli/index.js',
    '/Users/t0820/Downloads/gulp-esbuild-master/examples/typescript/node_modules/gulp/bin/gulp.js'
  ]
}
t0820@T0820 typescript % node -v
v14.15.1
t0820@T0820 typescript % npm -v
7.9.0

This can be fixed, if install esbuild manually.

I have this problem after 0.6.3 version. Before this version all work fine.

@ym-project
Copy link
Owner

Hi!
I looked at the commits connected with 0.6.3 version and was surprised.
According to this commit 3c802fa esbuild package was moved from dependencies to devDependencies. So npm doesn't install esbuild anymore.

And when I check examples I doesn't have problems because esbuild is installed in the root node_modules folder. And if there is no esbuild in the example folder, npm will take it from the root folder. That's why I didn't notice this problem.

I will fix it soon. Thank you for your issue!

@agat
Copy link
Author

agat commented Apr 16, 2021

Hello. I just thought that you have a globally package.

Good day, and thank you for good gulp plugin. 👍

ym-project added a commit that referenced this issue Apr 16, 2021
In version 6.3 of this plugin esbuild was moved to dev dependency by mistake. Because of this mistake npm didn't install esbuild dependency.
@ym-project
Copy link
Owner

I fixed this problem in 0.7.4 version. I checked examples and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants