我一直在按照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)