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

error TS2305: Module '"gulp"' has no exported member 'parallel' #2722

Closed
4 tasks done
duke-git opened this issue Mar 27, 2023 · 2 comments
Closed
4 tasks done

error TS2305: Module '"gulp"' has no exported member 'parallel' #2722

duke-git opened this issue Mar 27, 2023 · 2 comments

Comments

@duke-git
Copy link

duke-git commented Mar 27, 2023

Before you open this issue, please complete the following tasks:

  • use the search bar at the top of the page to search this repository for similar issues or discussions that have already been opened.
  • if you are looking for help from the gulp team or community, open a discussion.
  • if you think there is a problem with the plugin you're using, open a discussion.
  • if you think there is a bug in our code, open this issue.

What were you expecting to happen?

in gulp file. the import series, and parallel should works.

What actually happened?

error: error TS2305: Module '"gulp"' has no exported member

Please give us a sample of your gulpfile

import delPath from '../utils/delpath'
import { series, parallel, src, dest } from 'gulp'
import { pkgPath, componentPath } from '../utils/paths'
import less from 'gulp-less'
import autoprefixer from 'gulp-autoprefixer'
import run from '../utils/run'

//删除kui
export const removeDist = () => {
    return delPath(`${pkgPath}/kui`)
}

//打包样式
export const buildStyle = () => {
    return src(`${componentPath}/src/**/style/**.less`)
        .pipe(less())
        .pipe(autoprefixer())
        .pipe(dest(`${pkgPath}/kui/lib/src`))
        .pipe(dest(`${pkgPath}/kui/es/src`))
}

//打包组件
export const buildComponent = async () => {
    run('pnpm run build', componentPath)
}
export default series(
    async () => removeDist(),
    parallel(
        async () => buildStyle(),
        async () => buildComponent()
    )
)

Terminal output / screenshots

$ gulp

Please provide the following information:

  • OS & version [e.g. MacOS Catalina 12.6]:
  • node version (run node -v): v16.16.0
  • npm version (run npm -v): 8.11.0
  • gulp version (run gulp -v): CLI version: 2.3.0 Local version: 4.0.2

Additional information

@duke-git
Copy link
Author

I have uninstalled the old version of gulp and install gulp4 and new version of gulp-cli. But there is still error, can't find new gulp functions(parallel and series). Some can help this. Please infer blow snapshot.

image

@phated
Copy link
Member

phated commented Apr 6, 2023

Duplicate of #2634

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