最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Unable to install the package in the child project - Stack Overflow

programmeradmin0浏览0评论
-root
 - node_modules
 - packages
   - migrator
    - src
      -index.js
    - package.json
 - package.json

root(package.json) -

{
 "script" : {
   "build": "npm run build --ws --if-present",
   "lint": "npm run lint --ws --if-present",
   "lint-fix": "npm run lint-fix --ws --if-present"
   "test": "npm run test --ws --if-present"
   "automation-tests": "mocha ./src/automation-tests/**/*.test.js"
}
"workspaces": ["./packages/*"]
}

migrator (package.json) -

{
"scripts": {
"test": "jest --coverage --verbose --colors --reporters=default --reporters=jest-junit",
"build": "rm -rf dist && mkdir dist && cp package.json dist && cp -r src dist",
"lint-fix": "retail-linter --sourceFolder=./ --type=javascript --fix",
"lint": "retail-linter --sourceFolder=./ --type=javascript"
}

}

I am working on a Node.js project and following the specified file structure. The issues I am facing are:

When I am inside the migrator folder and run npm i, it installs the packages for the parent project instead of the child project. On the server, it is generating two folders: dist and src, with src containing the same files as dist.

发布评论

评论列表(0)

  1. 暂无评论