thmsgbrt / Chrome-Extension-with-React-and-Typescript-Starter-Pack

Chrome Extension with React and Typescript Starter Pack
https://medium.com/@th.guibert/create-a-chrome-extension-using-react-and-typescript-50e94e14320c
124 stars 25 forks source link

missing react-scripts dependency. #1

Closed kresli closed 4 years ago

kresli commented 4 years ago

run watch throws

internal/modules/cjs/loader.js:775
    throw err;
    ^

Error: Cannot find module 'react-scripts/config/paths'
Require stack:
- /Users/eduardjacko/developer/github/Chrome-Extension-with-React-and-Typescript-Starter-Pack/src/popup/noop.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:772:15)
    at resolveFileName (/Users/eduardjacko/developer/github/Chrome-Extension-with-React-and-Typescript-Starter-Pack/node_modules/resolve-from/index.js:29:39)
    at resolveFrom (/Users/eduardjacko/developer/github/Chrome-Extension-with-React-and-Typescript-Starter-Pack/node_modules/resolve-from/index.js:43:9)
    at module.exports (/Users/eduardjacko/developer/github/Chrome-Extension-with-React-and-Typescript-Starter-Pack/node_modules/resolve-from/index.js:46:47)
    at module.exports (/Users/eduardjacko/developer/github/Chrome-Extension-with-React-and-Typescript-Starter-Pack/node_modules/import-from/index.js:4:55)
    at module.exports (/Users/eduardjacko/developer/github/Chrome-Extension-with-React-and-Typescript-Starter-Pack/node_modules/import-cwd/index.js:4:30)
    at Object.<anonymous> (/Users/eduardjacko/developer/github/Chrome-Extension-with-React-and-Typescript-Starter-Pack/node_modules/cra-build-watch/scripts/index.js:18:57)
    at Module._compile (internal/modules/cjs/loader.js:936:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
    at Module.load (internal/modules/cjs/loader.js:790:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/eduardjacko/developer/github/Chrome-Extension-with-React-and-Typescript-Starter-Pack/src/popup/noop.js'
  ]
}

once I install react-scripts all good

thmsgbrt commented 4 years ago

Hi @kresli, I'll take care of this asap, thanks!!

thmsgbrt commented 4 years ago

Hi @kresli, Where did you install react-scripts? It is already included in the pop (CRA project). Running npm i in both root and src/popup then running watch script work for me.

kresli commented 4 years ago

yeah you right. I didn't npm i in popup :/ My bad.