I am working on a Laravel 5 project on a Windows machine and just encountered an error while attempting to run gulp-
events.js:85
throw er; // Unhandled 'error' event
^
SyntaxError: c:/Users/Benjamin/PhpstormProjects/essex-youth-footbal/resources/assets/bower/jquery/dist/vendor.js: Deleting local variable in strict mode (13795:23316)
13793 | //
Here is the entry in the gulpfile.js where this is being thrown:
mix.scripts([
'/assets/bower/jquery/dist/jquery.min.js',
'/assets/bower/bootstrap/dist/js/bootstrap.js',
'/assets/js/main.js',
'/assets/bower/bootbox/bootbox.js',
'/assets/bower/vue/dist/vue.min.js',
'/assets/bower/mustache/mustache.min.js',
'/assets/bower/bootstrap-multiselect/dist/js/bootstrap-multiselect.js',
'/assets/js/redactor.js',
'/assets/js/vendor/redactor/fontcolor.js',
'/assets/js/vendor/redactor/fontsize.js',
'/assets/js/vendor/redactor/imagemanager.js',
'/assets/js/vendor/redactor/video.js',
'/assets/bower/remarkable-bootstrap-notify/dist/bootstrap-notify.min.js',
'/assets/bower/jquery.maskedinput/dist/jquery.maskedinput.min.js',
'/assets/bower/moment/min/moment.min.js',
'/assets/bower/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js',
'/assets/bower/raphael/raphael-min.js',
'/assets/bower/morrisjs/morris.min.js'
], 'public/js/vendor.js', 'resources');
I also noticed that any merged JS files that ARE created have "use strict" prepended to the code.
gulp is working fine in another project on the same computer and this project's gulp configuration works fine on another computer. Any ideas what might be causing this?
Related
Currently we are using node Js version 8, if I switch that to node Js 16, application is not working, and it shows lot of errors.
How to upgrade the existing node js application to latest version of node? what are steps we need to follow?
Error:
{ inspect: [Function: inspect] }
[2022-04-18 11:18:27.085] [ERROR] app - Could not load adapter sails-db2 try npm install sails-db2
[2022-04-18 11:18:27.097] [INFO] app - Running ORM initialization, please wait...
C:\Chanel\Existing\chanel-reinvent-ui-db2\node_modules\waterline\lib\waterline\connections\index.js:62
throw new Error(msg);
^
Error: Unknown adapter "sails-db2" for connection `default`. You should double-check that the connection's `adapter` property matches the name of one of your adapters. Or perhaps you forgot to include your "sails-db2" adapter when you called `waterline.initialize()`...
Intuitively, I'd think that the writeToDisk option could be configured under configureDevServerOptions, but trying to do so yields this error:
Running webpack-dev-server ...
WARNING Webpack is already provided by Webpack Encore, also adding it to your package.json file may cause issues.
WARNING Passing an absolute URL to setPublicPath() *and* using the dev-server can cause issues. Your assets will load from the publicPath (http://localhost:9091/build/) instead of from the dev server URL.
[webpack-cli] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options has an unknown property 'writeToDisk'. These properties are valid:
object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, headers?, historyApiFallback?, host?, hot?, http2?, https?, ipc?, liveReload?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, setupExitSignals?, static?, watchFiles?, webSocketServer? }
error Command failed with exit code 2.
The value has also been attempted to be set through the getWebpackConfig() object, but the same error gets generated.
The next way to attack this could then be through devMiddleware due to this writeToDisk option. This produces this error:
Running webpack-dev-server ...
WARNING Webpack is already provided by Webpack Encore, also adding it to your package.json file may cause issues.
WARNING Passing an absolute URL to setPublicPath() *and* using the dev-server can cause issues. Your assets will load from the publicPath (http://localhost:9091/build/) instead of from the dev server URL.
TypeError: Cannot set property 'writeToDisk' of undefined
- webpack.config.js:99 Object.<anonymous>
C:/path/to/project/webpack.config.js:99:41
- apply-options-callback.js:13 module.exports
[project]/[#symfony]/webpack-encore/lib/utils/apply-options-callback.js:13:36
- config-generator.js:616 ConfigGenerator.buildDevServerConfig
[project]/[#symfony]/webpack-encore/lib/config-generator.js:616:16
- config-generator.js:60 ConfigGenerator.getWebpackConfig
[project]/[#symfony]/webpack-encore/lib/config-generator.js:60:74
- config-generator.js:631 module.exports
[project]/[#symfony]/webpack-encore/lib/config-generator.js:631:22
- index.js:1634 Encore.getWebpackConfig
[project]/[#symfony]/webpack-encore/index.js:1634:16
- EncoreProxy.js:51 Proxy.minDistance
[project]/[#symfony]/webpack-encore/lib/EncoreProxy.js:51:53
- webpack.config.js:126 Object.<anonymous>
C:/path/to/project/webpack.config.js:126:25
- v8-compile-cache.js:192 Module._compile
[project]/[v8-compile-cache]/v8-compile-cache.js:192:30
- loader:1153 Object.Module._extensions..js
node:internal/modules/cjs/loader:1153:10
error Command failed with exit code 1.
Since publicPath is not in this dev server "schema," I have had to set the public path through setPublicPath to the value in the warning, causing that warning to be generated.
The first warning is from setting my package.json Webpack definition to webpack#^5.35 so other dependency warnings are not generated.
How can options not defined in the dev server schema be properly configured?
This can be accomplished using the copyFiles function by just ensuring the whole build directory gets copied over in the dev-server environment.
I am in the process of learning Nodejs and WebRPC. I am for all intents and purposes, a novice.
I installed the Plivo (http://plivo.com) API for nodejs and when attempting to run it I had an issue with Const which I resolved by running my test file with --harmony appended to the start of the command, after this I have gained the error
Syntaxerror: Unexpected token ,
This error falls on line 506 of
\hawk\lib\server.js
The relevant section of code is;
const artifacts = {
ts: authorization.ts,
nonce: authorization.nonce,
host,
port,
hash: authorization.hash
};
line 506 is host,
I do not see the problem.
At this point, all I am trying to do is initialise the plivo API. I have no other calls to it.
I have deleted the hawk folder and done a fresh npm install hawk, can anyone else suggest anything?
edit:
As of writing the post, I attempted to load hawk directly in a script rather than as a dependency through plivo. It still brings up the same error so it won't be a problem with plivo.
Edit 2.
Seems it was a versioning issue. My system had v0.12 installed. I attempted to update it twice, both times the install went back to v0.12 despite uninstalling it first.
Cleared appdata\roaming\npm and appdata\roaming\npm-cache as well as deleting any remaining node files in "c:\program files" before reinstalling. I now have 8.x installed and the syntax error is no longer showing.
Thanks
Ken
When I try to start a meteor project I always get this error message (on my machine only, the project is working fine on my colleague's machines):
=> Started proxy.
=> Started MongoDB.
events.js:141
throw er; // Unhandled 'error' event
^
Error: write EOF
at exports._errnoException (util.js:907:11)
at WriteWrap.afterWrite (net.js:785:14)
Sometimes the error already shows up before mongo is stared.
In fact, I cannot start any project anymore ... :-(
It seems that I have a serious problem with my meteor installation.
I tried re-installing meteor, but no effect.
meteor reset --> no effect
Could it be a problem with a downloaded package? Where does meteor store the packages?
I really would appreaiate any hint what I can try to make it work again.
I'm using meteor on windows.
I switched from OSX to Windows 7. A project I'm coding is throwing an error which I believe to be related to the switch.
The first line below is the line causing the error to be thrown:
if (!/not find/i.test(e.message)) {
throw e
}
The error is:
Error: %1 is not a valid Win32 application.
Could somebody tell me how to get this line working in Windows?
If you copy a project from one platform to another or you switch CPU architectures (e.g. x86 to ARM or x86 to x86_64), you'll need to recompile any addons that your project may have been using, either directly or indirectly.