Akeneo installation / NODE_PATH=node_modules not recognized / yarn run webpack Error

浪尽此生 提交于 2019-12-06 00:31:13

First of all, if you're using windows you should remove this part NODE_PATH=node_modules. You should add this variable to your environment variables. There is already a question about it: Nodejs cannot find installed module on Windows?.

Second, if you trigger yarn, it goes to package.json and search for variable "scripts". Webpack doesn't know what is $npm_package_config_source and $npm_package_config_check. It looks like not initialized PHP variables, but I might be wrong. There are 2 variables in the package.json :

"config": {
    "source": "vendor/akeneo/pim-community-dev",
    "check": "vendor/akeneo/pim-community-dev/webpack/check-dependencies.js"
},

If so, you should change scripts variable in package.json to this:

"scripts": {
    "sync": "node vendor/akeneo/pim-community-dev/webpack/check-dependencies.js --source=vendor/akeneo/pim-community-dev",
    "webpack": "yarn run sync && webpack --config vendor/akeneo/pim-community-dev/webpack.config.js --env=prod",
    "webpack-dev": "yarn run sync && webpack --config vendor/akeneo/pim-community-dev/webpack.config.js",
    "webpack-watch": "yarn run sync && webpack --progress --config vendor/akeneo/pim-community-dev/webpack.config.js --watch"
},
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!