ERROR in ./src/index.js 1:0-51
Module not found: Error: Can't resolve 'app_package' in 'C:\Users\Fiolent2\Source\Repos\npm-package-template\test_package\src'
I don’t quite repro what you’re seeing. I do see the “Module not found” error early on, but it’s just a timing error (I believe from Webpack looking for app_package results before they’ve built yet) which resolves itself within a few seconds. Thus, when I run npm run dev in the root directory and it launches a browser page, the page at first reports errors but then immediately refreshes as the timing works itself out. Does the message you posted above pass quickly, or does it stick around?
I’ve also never seen the “This is not the tsc command you are looking for” message, but it looks like it may indicate something off in the installation. Do you perhaps have TypeScript or tsc installed globally?
Sounds good! If you find there’s a better way we should rephrase command to make sure it invokes the correct TypeScript, even if there’s global path stuff, please let me know or add a PR. Always great to be robust to more scenarios. Thanks!
I removed this line but with no success.
After changing tsc --watch -p to tsc *.ts --watch I got some green files at least
Still there are some errors (console screenshot below) which I couldn’t overcome.
Thats probably a symlink issue from using a file uri to install app_package or npm-recursive-install or both, plus webpack has bad caching logic so its not looking for the file because it didnt find it before it was compiled and its looking for file change events. You may need to do a second install after you compile the typescript in app_package in order for the test_package to see it. Or, maybe just running tsc before webpack instead of concurrently. It depends if the first install did a symlink or hard link. Is your intent to test the package template or just trying to get something going?
Seems that I finally found a good way to establish more organized workflow, especially regarding the fact that here designers have their own assets repo and are separated from the code repository.
By the way, there is a tutorial mentioned in the Docs - hope it will be published soon.