我只是按照官方网站的步骤:
第1步。
npm install --save next react react-dom
Run Code Online (Sandbox Code Playgroud)
步骤 2. 向 package.json 添加脚本
{
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
}
}
Run Code Online (Sandbox Code Playgroud)
步骤 3. 在项目中添加 ./pages/index.js:
export default () => <div>Welcome to next.js!</div>
Run Code Online (Sandbox Code Playgroud)
然后我运行 npm run dev 并得到错误:
/Users/jh/Documents/worksapce/react/nextJs/test1/node_modules/webpackbar/dist/index.js:55
const hasRunning = () => Object.values(sharedState).find(s => s.isRunning);
^
TypeError: Object.values is not a function
Run Code Online (Sandbox Code Playgroud)
我哪里做错了?
| 归档时间: |
|
| 查看次数: |
427 次 |
| 最近记录: |