1

I am trying to npm install a fork of a good project with a lot of flaws https://github.com/codyc4321/react-data-components. We need our own copy of it and to make changes, so I forked it and deleted it from the repo.

cchilders:~/work_projects/myproject (feature/investigate-fixing-react-data-components-table) 
$ rm -rf node_modules/react-data-components/

cchilders:~/work_projects/myproject (feature/investigate-fixing-react-data-components-table) 
$ atom .

cchilders:~/work_projects/myproject (feature/investigate-fixing-react-data-components-table) 
$ npm i https://github.com/codyc4321/react-data-components
[email protected] /Users/cchilders/work_projects/myproject
├── UNMET PEER DEPENDENCY [email protected]
├── UNMET PEER DEPENDENCY [email protected]
└── [email protected]  (git+https://github.com/codyc4321/react-data-components.git#bfa230d806c59f4703346a8377b2e1938152cefd)

npm WARN [email protected] requires a peer of [email protected] but none was installed.
npm WARN [email protected] requires a peer of [email protected] - 1.x but none was installed.
npm WARN [email protected] requires a peer of react@^15.5.0 but none was installed.
npm WARN [email protected] No repository field.

cchilders:~/work_projects/myproject (feature/investigate-fixing-react-data-components-table) 
$ npm i --save coffee-script react
[email protected] /Users/cchilders/work_projects/myproject
├── [email protected] 
└─┬ UNMET PEER DEPENDENCY [email protected]
  └── [email protected] 

npm WARN [email protected] requires a peer of [email protected] - 1.x but none was installed.
npm WARN [email protected] No repository field.

cchilders:~/work_projects/myproject (feature/investigate-fixing-react-data-components-table) 
$ npm i --save coffee-script [email protected]
[email protected] /Users/cchilders/work_projects/myproject
├── [email protected] 
└── UNMET PEER DEPENDENCY [email protected]

npm WARN [email protected] requires a peer of [email protected] - 1.x but none was installed.
npm WARN [email protected] No repository field.

cchilders:~/work_projects/myproject (feature/investigate-fixing-react-data-components-table) 
$ node server-dev.js 


...

ERROR in ./client/components/tables/OrderMetricsDataTable.js
Module not found: Error: Can't resolve 'react-data-components' in '/Users/cchilders/work_projects/myproject/client/components/tables'
 @ ./client/components/tables/OrderMetricsDataTable.js 64:16-48
 @ ./client/controllers/OrderMetricsController.js
 @ ./client/main.js
 @ multi webpack-hot-middleware/client ./client/main.js

ERROR in ./client/components/tables/GenericTable.js
Module not found: Error: Can't resolve 'react-data-components' in '/Users/cchilders/work_projects/myproject/client/components/tables'
 @ ./client/components/tables/GenericTable.js 67:16-48
 @ ./client/controllers/checkoutEventLogController.js
 @ ./client/main.js
 @ multi webpack-hot-middleware/client ./client/main.js

 ...

If I delete this and install the same code with npm i react-data-components, it works. The code is the same because I haven't made my changes yet, and I'm surprised the same code doesn't install. Putting his code inside our project (but not in node modules) caused a syntax error with the word static and probably because there's some TypeScript in his code.

How do I install this fork with npm so I can update my changes when I make them?

1 Answer 1

1

Clone the project to a local directory and then run npm install /path/to/cloned/directory

Sign up to request clarification or add additional context in comments.

1 Comment

hmm. would you happen to know why that works? the recommendation was here remarkablemark.org/blog/2016/09/19/npm-install-from-github

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.