gpt4 book ai didi

javascript - babelrc 中指定的未知插件 "transform-object-assign"

转载 作者:行者123 更新时间:2023-11-28 05:04:10 26 4
gpt4 key购买 nike

我在 IE 中运行 React 应用程序时遇到问题。于是我安装了一个babel插件并安装了。它在我同事的机器上运行良好,但我遇到了错误。

 ReferenceError: Unknown plugin "transform-object-assign" specified in "C:\\Users\\vgudipati\\Desktop\\gssp-servicing-multitenancy\\.babelrc" at 1, attempted to resolve relative to "C:\\Users\\vgudipati\\Desktop\\gssp-servicing-multitenancy"

我的 babelrc 看起来像这样

{
"presets": [
"es2015-ie",
"stage-0",
"react"
],
"plugins": [
"transform-node-env-inline",
"transform-object-assign"
]
}

打包 json。

{
"name": "remix-demo",
"version": "0.9.11",
"description": "Remix demo",
"scripts": {
"test": "jest",
"build:client": "gulp build:client",
"build:server": "guilp build:server",
"build": "gulp build",
"serve": "gulp serve",
"start": "gulp",
"run": "gulp run"
},
"repository": {
"type": "git",
"url": "gi+https://stash.infusion.com/scm/gssp/remix-demo.git"
},
"author": "MetLife",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"babylon": "^6.7.0",
"base64toblob": "0.0.1",
"bluebird": "^3.3.4",
"bootstrap-sass": "^3.3.6",
"classnames": "^2.2.3",
"compression": "1.6.2",
"d3": "^3.5.16",
"es6-map": "^0.1.3",
"es6-symbol": "^3.0.2",
"filesaver.js": "^0.2.0",
"font-awesome": "4.3.0",
"graphql": "^0.4.18",
"gssp-common-lib": "0.9.30",
"gssp-servicing-configurations": "0.9.30",
"gssp-servicing-lib": "0.9.30",
"helmet": "3.1.0",
"immutable": "^3.7.6",
"immutable-reducers": "^1.1.0",
"isomorphic-fetch": "^2.2.1",
"lodash": "^4.11.1",
"mongojs": "^2.3.0",
"namespaces-js": "0.5.4",
"numeral": "^1.5.3",
"on-headers": "1.0.1",
"react": "^15",
"react-bootstrap": "^0.28.3",
"react-bootstrap-datetimepicker": "^0.0.22",
"react-google-maps": "^4.10.1",
"react-google-recaptcha": "^0.5.2",
"react-input-calendar": "^0.1.20",
"react-redux": "^4.4.1",
"react-toggle": "2.1.1",
"react-truncate": "^2.0.3",
"react-typeahead": "^1.1.6",
"redux": "^3.3.1",
"redux-thunk": "^2.0.1",
"remix-client": "0.9.41",
"remix-common": "0.9.41",
"remix-server": "0.9.41",
"winston": "2.2.0"
},
"devDependencies": {
"babel-eslint": "^6.0.2",
"babel-plugin-transform-node-env-inline": "^6.5.0",
"babel-plugin-transform-object-assign": "^6.22.0",
"babel-preset-es2015-ie": "^6.6.2",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-0": "^6.5.0",
"babel-register": "^6.7.2",
"babelify": "^7.2.0",
"browserify": "^13.0.0",
"del": "^2.2.0",
"env-manager": "^0.2.2",
"eslint-config-airbnb": "^6.2.0",
"eslint-plugin-react": "^4.3.0",
"fs.extra": "^1.3.2",
"gulp": "3.9.1",
"gulp-autoprefixer": "3.1.0",
"gulp-babel": "6.1.2",
"gulp-bless": "^3.2.0",
"gulp-clean-css": "2.0.3",
"gulp-concat": "2.6.0",
"gulp-eslint": "2.0.0",
"gulp-if": "2.0.0",
"gulp-inject": "4.0.0",
"gulp-install": "0.6.0",
"gulp-load-plugins": "1.2.0",
"gulp-nodemon": "2.0.6",
"gulp-replace": "0.5.4",
"gulp-sass": "2.2.0",
"gulp-sourcemaps": "1.6.0",
"gulp-tasks-registrator": "0.2.4",
"gulp-uglify": "1.5.3",
"gulp-util": "3.0.7",
"merge-stream": "^1.0.0",
"minimist": "^1.2.0",
"run-sequence": "^1.1.5",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0",
"vinyl-transform": "^1.0.0",
"watchify": "^3.7.0"
},
"browserify": {
"transform": [
[
"babelify"
]
]
}
}

请帮忙。

谢谢!

最佳答案

在构建之前从 package 目录中删除 .babelrc 文件 rm "C:\Users\vgudipati\Desktop\gssp-servicing-multitenancy\.babelrc"

关于javascript - babelrc 中指定的未知插件 "transform-object-assign",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41883451/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com