0

操作系统:Windows 节点:14.15 pnpm 6.16.1 示例 package.json

{
  "name": "minimum-parcel-build",
  "browserslist": [
    "last 6 Chrome versions"
  ],
  "version": "0.0.1",
  "license": "",
  "scripts": {
    "preinstall": "npx only-allow pnpm",
    "build": "rm -rf dist && cross-env NODE_ENV=production parcel build --no-cache --public-url ./ src/index.html -d dist"
  },
  "devDependencies": {
    "@babel/core": "^7.0.0-0",
    "@babel/plugin-proposal-class-properties": "^7.10.4",
    "@babel/plugin-proposal-export-namespace-from": "^7.12.1",
    "@babel/plugin-proposal-nullish-coalescing-operator": "^7.13.8",
    "@babel/preset-env": "^7.11.5",
    "@babel/preset-react": "^7.10.4",
    "dotenv": "^10.0.0",
    "parcel": "1.12.3",
    "parcel-bundler": "1.12.3",
    "cross-env": "^7.0.3",
    "dotenv": "^10.0.0"
  },
  "dependencies": {
    "react": "^17.0.1",
    "react-dom": "^17.0.1",
    "react-helmet": "^6.0.0"
  }
}

index.js

import React from 'react'
import ReactDom from 'react-dom'
import { Helmet } from 'react-helmet'

const AppContainer = () => {
  return <p>Hello world</p>
}

ReactDom.render(<AppContainer />, document.getElementById('root'))

当我做

pnpm build

我得到错误:

无法解决依赖“反应副作用”

4

0 回答 0