I am using angular11 and after removing the bootstrap from my project it gives below error when run command ng build --prod
Earlier it is working fine. i tried to update core and terser depenadicies but no luck. please help.
Error: scripts.d4d60eb3a58ff1e99223.js from Terser
Unexpected character '#' [scripts.d4d60eb3a58ff1e99223.js:3,0]
at js_error (D:\Projects\PorticoWebApp\node_modules\terser\dist\bundle.min.js:550:11)
at parse_error (D:\Projects\PorticoWebApp\node_modules\terser\dist\bundle.min.js:686:9)
at Object.next_token [as input] (D:\Projects\PorticoWebApp\node_modules\terser\dist\bundle.min.js:1119:9)
at peek (D:\Projects\PorticoWebApp\node_modules\terser\dist\bundle.min.js:1254:56)
at next (D:\Projects\PorticoWebApp\node_modules\terser\dist\bundle.min.js:1259:24)
at parse (D:\Projects\PorticoWebApp\node_modules\terser\dist\bundle.min.js:1248:15)
at minify (D:\Projects\PorticoWebApp\node_modules\terser\dist\bundle.min.js:27665:42)
at minify (D:\Projects\PorticoWebApp\node_modules\terser-webpack-plugin\dist\minify.js:162:24)
at Object.transform (D:\Projects\PorticoWebApp\node_modules\terser-webpack-plugin\dist\minify.js:175:10)
at execFunction (D:\Projects\PorticoWebApp\node_modules\jest-worker\build\workers\processChild.js:145:17)
Can you re-install package after that delete Terser package in node-modules. If doesn't solve the problem, can you type package version.
Related
I got this error when I just download and npm/install/run this angular based project.
https://github.com/OpenClassrooms-Student-Center/dwj-projet6
Instructions :
Clone project
Execute npm install
Execute npm start.
API execution on http://localhost:3000
Errors
ng serve
Your global Angular CLI version (11.2.6) is greater than your local version (7.0.7). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
Error: Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
at MergeMapSubscriber.project (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\#angular-devkit\core\src\workspace\workspace.js:215:42)
at MergeMapSubscriber._tryNext (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\rxjs\internal\operators\mergeMap.js:69:27)
at MergeMapSubscriber._next (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\rxjs\internal\operators\mergeMap.js:59:18)
at MergeMapSubscriber.Subscriber.next (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\rxjs\internal\Subscriber.js:67:18)
at MergeMapSubscriber.notifyNext (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\rxjs\internal\operators\mergeMap.js:92:26)
at InnerSubscriber._next (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\rxjs\internal\InnerSubscriber.js:28:21)
at InnerSubscriber.Subscriber.next (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\rxjs\internal\Subscriber.js:67:18)
at MapSubscriber._next (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\rxjs\internal\operators\map.js:55:26)
at MapSubscriber.Subscriber.next (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\rxjs\internal\Subscriber.js:67:18)
at SwitchMapSubscriber.notifyNext (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\rxjs\internal\operators\switchMap.js:86:26)
Thank you
It's works fine for me.
Try below way maybe it help you
Solution 1: Delete node_modules folder and run npm install.
Solution 2: I think you should decrease your angular CLI version, try with CLI version 8.
I have a project that built fine with ng build --prod until I upgraded the version of TypeScript from 2.72 to 2.92 in my package.json.
After upgrading, I now get the following error:
ERROR in Cannot read property 'Symbol(Symbol.iterator)' of undefined
However, the project builds fine using ng build and runs fine using ng serve so I have no idea where this problem is occurring and the error doesn't tell me where the problem is in my project.
I found the issue. Using resolveJsonModule seems to be the issue as pointed out via this issue on Github: https://github.com/angular/angular/issues/25456
Exact same error. Really surprised that this hasn't been fixed properly.
Problem was I had no clue what the problem was as the error message was so vague. Commenting out my json import in my app.module made the build work as intended.
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
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.
I started to work on a new project and I need to set up the environment. All the others team members work with a OS X environment while I'm using Ubuntu 14. The project is already working for them but I'm having problems setting up.
I'm getting this error when I try to run
$ gulp watch
Cannot find module 'React' from '/home/camilatigre/dev/kahuso/kahuso-ux/scripts/components/company/dashboard'`
And if I try to run browserify I also get a similar error:
$ browserify -t reactify ./scripts/app.jsx > app.js
Error: Cannot find module 'React' from '/home/camilatigre/dev/kahuso/kahuso-ux/scripts/components/company/dashboard'
at /home/camilatigre/.nvm/versions/node/v0.12.7/lib/node_modules/browserify/node_modules/resolve/lib/async.js:46:17
at process (/home/camilatigre/.nvm/versions/node/v0.12.7/lib/node_modules/browserify/node_modules/resolve/lib/async.js:173:43)
at ondir (/home/camilatigre/.nvm/versions/node/v0.12.7/lib/node_modules/browserify/node_modules/resolve/lib/async.js:188:17)
at load (/home/camilatigre/.nvm/versions/node/v0.12.7/lib/node_modules/browserify/node_modules/resolve/lib/async.js:69:43)
at onex (/home/camilatigre/.nvm/versions/node/v0.12.7/lib/node_modules/browserify/node_modules/resolve/lib/async.js:92:31)
at /home/camilatigre/.nvm/versions/node/v0.12.7/lib/node_modules/browserify/node_modules/resolve/lib/async.js:22:47
at FSReqWrap.oncomplete (fs.js:95:15)
I already tried to reinstall npm, nodejs, browserify, reactify, clean the node_modules folder and re-add all the packages but nothing works.
Any suggestions? :)
i found a solution. 2 archives were using a require('React') when it should be a lowercase r.