我目前正在使用称为react-vertical-tree的模块。我希望编辑Github存储库中的一些代码,并用我的项目对其进行测试。我使用yarn-link尝试将本地文件与项目链接,但出现错误:
“模块解析失败:意外的令牌(18:8)您可能需要适当的加载程序来处理此文件类型。”
我的package.json
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "^4.2.0",
"@material-ui/icons": "^4.2.1",
"@types/jest": "24.0.15",
"@types/node": "^12.0.12",
"@types/react": "^16.8.23",
"@types/react-dom": "16.8.4",
"@typescript-eslint/eslint-plugin": "^1.11.0",
"@typescript-eslint/parser": "^1.11.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-react": "^7.14.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-scripts": "3.0.1",
"react-vertical-tree": "../react-vertical-tree",
"serve": "^11.0.2",
"styled-components": "^4.3.2",
"ts-essentials": "^3.0.0",
"typescript": "^3.5.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"eslint-check": "eslint --print-config ./src/App.tsx | eslint-config-prettier-check"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"eslint-config-prettier": "^6.0.0"
}
}
我尚未对react-vertical-tree文件进行任何编辑,所以我不确定出什么问题。
我尝试在package.json上修复我的配置,但没有任何帮助。