小编Ver*_*rry的帖子

如何安装节点模块@ babel / plugin-transform-class-properties?

我一直在按照https://github.com/babel/babelify的说明进行操作,一路遇到错误。我运行以下代码行:

browserify script.js -o bundle.js -t [ babelify --presets [ @babel/preset-env @babel/preset-react ] --plugins [ @babel/plugin-transform-class-properties ] ]
Run Code Online (Sandbox Code Playgroud)

终端产生以下错误信息:

Error: Cannot find module '@babel/plugin-transform-class-properties' from '/path/to/file' while parsing file: /path/to/file/circle-graph-2.js
Run Code Online (Sandbox Code Playgroud)

我的package.json文件是

{
  "name": "robert",
  "version": "1.0.0",
  "description": "This is the third step of my first attempt to learn canvas. I want to improve a piece a made a few weeks ago about the division of [occupations](http://nbremer.github.io/occupations/). The D3.js version has so many DOM elements due to all the …
Run Code Online (Sandbox Code Playgroud)

javascript babel node.js

5
推荐指数
1
解决办法
4737
查看次数

标签 统计

babel ×1

javascript ×1

node.js ×1