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

Cannot find package '@babel/plugin-transform-runtime' #226

Open
lvpangpang opened this issue Sep 26, 2022 · 0 comments
Open

Cannot find package '@babel/plugin-transform-runtime' #226

lvpangpang opened this issue Sep 26, 2022 · 0 comments

Comments

@lvpangpang
Copy link

我基于gulp写了一个脚手架,用到了gulp-babel编译js
我写好这个脚手架后发布到npm,然后在本地新建一个文件夹局部安装这个脚手架一切正常
但是当我把这个脚手架全局安装后在项目文件夹使用会报错

[15:34:15] Error in plugin "gulp-babel"
Message:
Cannot find package '@babel/plugin-transform-runtime' imported from C:\Users\57481\Desktop\github\test-gulp-admin-global\babel-virtual-resolve-base.js

唯一的区别就是一个是局部安装一个是全局安装

gulp.task("js", function () { return ( gulp .src(resolvePath("src/**/*.js")) .pipe( babel({ presets: ["@babel/env"], plugins: ["@babel/transform-runtime"], }) ) .pipe(browserify()) .pipe(gulp.dest(dist)) .pipe(connect.reload()) ); });

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

1 participant