首页 > 解决方案 > 将 create-react-app 与旧节点版本一起使用

问题描述

是否可以在节点 13.6.0 上安装任何 create-react-app 版本?我不能使用win7的实际节点cuz。对于我的实际节点,许多 create-react-app 依赖项向我表明它们需要更新或旧版本的节点。

    Installing template dependencies using npm...
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'browserslist@4.17.0',
npm WARN EBADENGINE   required: { node: '^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7' },
npm WARN EBADENGINE   current: { node: 'v13.6.0', npm: '7.21.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'eslint-utils@3.0.0',
npm WARN EBADENGINE   required: { node: '^10.0.0 || ^12.0.0 || >= 14.0.0' },
npm WARN EBADENGINE   current: { node: 'v13.6.0', npm: '7.21.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'nanoid@3.1.25',
npm WARN EBADENGINE   required: { node: '^10 || ^12 || ^13.7 || ^14 || >=15.0.1' },
npm WARN EBADENGINE   current: { node: 'v13.6.0', npm: '7.21.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'postcss@8.3.6',
npm WARN EBADENGINE   required: { node: '^10 || ^12 || >=14' },
npm WARN EBADENGINE   current: { node: 'v13.6.0', npm: '7.21.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'browserslist@4.14.2',
npm WARN EBADENGINE   required: { node: '^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7' },
npm WARN EBADENGINE   current: { node: 'v13.6.0', npm: '7.21.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'pretty-format@27.1.0',
npm WARN EBADENGINE   required: { node: '^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0' },
npm WARN EBADENGINE   current: { node: 'v13.6.0', npm: '7.21.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'jest-diff@27.1.0',
npm WARN EBADENGINE   required: { node: '^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0' },
npm WARN EBADENGINE   current: { node: 'v13.6.0', npm: '7.21.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'pretty-format@27.1.0',
npm WARN EBADENGINE   required: { node: '^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0' },
npm WARN EBADENGINE   current: { node: 'v13.6.0', npm: '7.21.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@jest/types@27.1.0',
npm WARN EBADENGINE   required: { node: '^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0' },
npm WARN EBADENGINE   current: { node: 'v13.6.0', npm: '7.21.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'diff-sequences@27.0.6',
npm WARN EBADENGINE   required: { node: '^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0' },
npm WARN EBADENGINE   current: { node: 'v13.6.0', npm: '7.21.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'jest-get-type@27.0.6',
npm WARN EBADENGINE   required: { node: '^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0' },
npm WARN EBADENGINE   current: { node: 'v13.6.0', npm: '7.21.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@jest/types@27.1.0',
npm WARN EBADENGINE   required: { node: '^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0' },
npm WARN EBADENGINE   current: { node: 'v13.6.0', npm: '7.21.1' }
npm WARN EBADENGINE }

在 npm start 之后我有

Error: No valid exports main found for '..app\node_modules\colorette'

标签: node.jsreactjsnpmcreate-react-app

解决方案


推荐阅读