I'm using this template to get my project setup: https://github.com/wmaurer/react-hot-boilerplate-ts
When doing npm start i get the error (eventually):
ERROR in ./src/index.tsx
Module build failed: TypeError: compiler.parseConfigFile is not a function
at ensureTypeScriptInstance (C:\Users\mslavsky\Desktop\react-hot-boilerplate-ts-master\node_modules\ts-loader\index.js:147:38)
at Object.loader (C:\Users\mslavsky\Desktop\react-hot-boilerplate-ts-
master\node_modules\ts-loader\index.js:365:14)
# multi main
webpack: Failed to compile.
Can anyone help please? I did npm install as well
I suggest you take a look this project: https://github.com/jquintozamora/react-typescript-webpack2-cssModules-postCSS
There you can see configuration for WebPack 2, React Hot Loader, TypeScript and React
Related
The opencv4nodejs module is working fine but when I integrate it with next.js, it is showing the following error --
Error in ./utils
Module not found: Error: Can't resolve 'child_process' in '/Users/yathartharora/Certificate/node_modules/opencv-build/build
When I run my OpenCV part separately it is working fine but as soon as I import it in my index.js it shows an error. Can someone please help me in resolving this
I'm using https://nx.dev/angular to develop a microservice app but now I'm getting the following errors:
ERROR in /home/vagrant/document-registry/node_modules/#graphql-tools/git-loader/index.esm.js
Module not found: Error: Can't resolve 'child_process' in '/home/vagrant/document-registry/node_modules/#graphql-tools/git-loader'
This particular subproject is an Angular app and I don't know how to prevent node modules that are not part of the browser API from being packaged since the entire application is being used with one package.json file. I'm running this in a vagrant environment.
Can anyone point me in the right direction on this?
Details: running OS 10.11, using Angular version 1.2.6, npm 5.3.0, node 8.2.0.
So I'm learning Angular for the first time, and I keep running into the same problem where if I create a new project using 'ng new [PROJECT]' and then use 'ng serve' it compiles and displays properly, but then if I try to use 'ng g c [NEW_COMPONENT]' then it breaks the project. Specifically, it says that 'Module Not Found: Error: Can't resolve [PATH]' and it gives a valid path for the component, the path that ng itself generated. What's going on here? I've tried uninstalling #angular/cli and node and npm several times and I can't seem to get Angular to reliably generate new components on its own. What am I doing wrong here?
ERROR in /Users/{USER}/Dropbox/angularprojects/shadowrun-inventory/src/app/app.module.ts (5,36): Cannot find module './src/app/inventory/inventory.component'.
ERROR in Error encountered resolving symbol values statically. Could not resolve ./src/app/inventory/inventory.component relative to /Users/{USER}/Dropbox/angularprojects/shadowrun-inventory/src/app/app.module.ts., resolving symbol AppModule in /Users/{USER}/Dropbox/angularprojects/shadowrun-inventory/src/app/app.module.ts, resolving symbol AppModule in /Users/{USER}/Dropbox/angularprojects/shadowrun-inventory/src/app/app.module.ts
ERROR in ./src/app/app.module.ts
Module not found: Error: Can't resolve './src/app/inventory/inventory.component' in '/Users/{USER}/Dropbox/angularprojects/shadowrun-inventory/src/app'
# ./src/app/app.module.ts 10:0-77
# ./src/main.ts
# multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
webpack: Failed to compile.
This is the error I receive. What am I doing wrong here?
I'm trying to deploy my project on Heroku. I've been able to heroku open the app and see it but I get a 404 on my bundle.js. The app is on github here. The app is on heroku here.
I've tried making sure my dependencies are all there regarding babel, babelify, grunt, etc. But I must be still missing something.
I don't get any errors after my git push heroku but I still get my 404.
I am able to recreate this locally as well. This is what I get when I run your postinstall script code:
$ npm run postinstall
> ncps-mms#0.0.0 postinstall ncps-mms
> gulp transpile --gulpfile client/gulpfile.babel.js
[00:18:43] Requiring external module babel-register
[00:18:43] Working directory changed to ncps-mms/client
(node:30276) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
[00:18:43] Using gulpfile ncps-mms/client/gulpfile.babel.js
[00:18:44] Starting 'transpile'...
Error: Cannot find module './controllers/members-detail-controller' from 'ncps-mms/client/src'
[00:18:44] Finished 'transpile' after 184 ms
I see this error:
Error: Cannot find module './controllers/members-detail-controller' from 'ncps-mms/client/src'
The members-detail-controller is missing - See: https://github.com/gh0st/ncps-mms/tree/master/client/src/controllers.
If I comment out the following lines, https://github.com/gh0st/ncps-mms/blob/master/client/src/app.js#L4 and https://github.com/gh0st/ncps-mms/blob/master/client/src/app.js#L15 then run npm run postinstall again, the gulp tasks run without errors. I am then able to start the server without the 404's on bundle.js.
When I import 'electron' and run Jest, following error occurs. Using require or import don't matter.
And jest.autoMockOff() doesn't help also.
FAIL __tests__/root_test.js
● Runtime Error
TypeError: Cannot read property 'on' of undefined
Versions are as follows.
node: v4.2.1
jest-cli: v0.8.2
electron-prebuilt: v0.36.4
Can anyone help me?
If your tests load built-in Electron modules you have to run them within an Electron process, built-in Electron modules are not available in a regular Node process (which is what you get if you just run jest from the commandline).
Try setting modulePathIgnorePatterns in package.json
https://facebook.github.io/jest/docs/api.html#config-modulepathignorepatterns-array-string