I am very new to programming and I have chosen to learn sveltekit. I am following this YouTube tutorial however he lost me when my skeleton project was not working!
Here is the output that I received in the terminal `$ npm run dev
client#0.0.1 dev /home/runner/svelte-chat/client
svelte-kit dev
file:///home/runner/svelte-chat/client/node_modules/#sveltejs/kit/dist/cli.js:861
https = https || !!vite_config.server?.https;
^
SyntaxError: Unexpected token '.'
at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client#0.0.1 dev: svelte-kit dev
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client#0.0.1 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-11-30T00_11_38_289Z-debug.log `
Any help at all is appreciated as I am a total beginner. I am using a MacBook Pro 13” running MacOS Monterey.
#SvelteNewbie.
Please take time to properly display the code and the error messages in your post.
The solution to your problem is to simply update your node version (please perform background research before posting your question to stack overflow).
To update your node version, refer to a similar question.
Hope this helps and enjoy your programming journey!
Related
I build React App and deploy it to Linux Plan at Azure App Service.
I have 2 versions of service at 2 different Service Plans.
After some changes at code, I tried to deploy it to one of the Plans and it can't start/
Locally it works normally.
But at the server I got this message ":( Application Error";
I deploy application by Visual Studio Code but got same problem with Github Actions.
At log files, I found this
Cound not find build manifest file at '/home/site/wwwroot/oryx-manifest.toml'
Could not find operation ID in manifest. Generating an operation id...
Looks strange, because on the second Service Plan I have this file and this version worked.
Second message on logs
npm start
npm info it worked if it ends with ok
npm info using npm#6.14.14
npm info using node#v12.22.4
pm info lifecycle backup-resurge#0.1.0~prestart: backup-resurge#0.1.0
npm info lifecycle backup-resurge#0.1.0~start: backup-resurge#0.1.0
backup-resurge#0.1.0 start /home/site/wwwroot
react-scripts start
/home/site/wwwroot/node_modules/.bin/../node/bin/node: 1: /home/site/wwwroot/node_modules/.bin/../node/bin/node: This: not found
npm info lifecycle backup-resurge#0.1.0~start: Failed to exec start script
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! backup-resurge#0.1.0 start: react-scripts start
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the backup-resurge#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm timing npm Completed in 1606ms
But I think that's file exists
Does anyone know what I can try to solve this problem?
This may have been asked before however I am trying to open the devleopment site on chrome for my webpage but are getting this issue:
code ELIFECYCLE
npm ERR! errno 1
npm ERR! jamming#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jamming#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
This is happening when I type npm start in the command line.
I have no issues opening it on the macbook I created the react file but I am trying to open this on a seperate Mac where I am facing this issue. The files are saved in Icloud so can access on both computers but doesn't appear to show the same information.
Any assistance would be hugely appreciated.
Many thanks
i have troubles updating the new version of react-native which appears to improve vastly and a lot of features.
After reading this article :
https://facebook.github.io/react-native/blog/2018/07/04/releasing-react-native-056
I've started to run this command : https://facebook.github.io/react-native/docs/upgrading.html
All goes well, the application is built after running react-native run-ios
The problem is the bundle which is buggy :
node node_modules/react-native/local-cli/cli.js start "--reset-cache"
Scanning folders for symlinks in
/Users/julestruong/Dev/BAP/flex/v1/flex-mobile-app/node_modules (14ms)
warning: the transform cache was reset.
Cannot find module 'metro/src/transformer'
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! flex#0.0.1 start:
node node_modules/react-native/local-cli/cli.js start
"--reset-cache" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at
the flex#0.0.1 start script. npm ERR! This is probably not a problem
with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
Tries :
remove node_modules
start --reset-cache
delete package-lock.json and reinstall.
Nothing works ...
If you're using typescript you'll need to upgrade react-native-typescript-transformer to 1.2.10 since metro moved the transformer it relies on.
I am new to React and I am trying to build a react app using create-react-app and Watson node-sdk. Everything works fine in development mode after running npm start. But when I try to build a production package using npm run build and below is the error I receive.
e:\Microsoft\Workspace\React\myapp>npm run build
> myapp#0.1.0 build e:\Microsoft\Workspace\React\myapp
> react-scripts build
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/watson-developer-cloud/lib/helper.js:31
Read more here: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! myapp#0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the myapp#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional
logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\yk\AppData\Roaming\npm-cache\_logs\2017-09-
20T09_40_36_144Z-debug.log
The line that giving error is let missing; and seems like the let is causing the issue. Is there anything I can do with this?
Encountered this problem today. the doc suggests some solutions:
Open an issue on the dependency's issue tracker and ask that the package be published pre-compiled.
Fork the package and publish a corrected version yourself.
If the dependency is small enough, copy it to your src/ folder and treat it as application code.
Read more here: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify
This is my first attempt at learning react, and it's started terribly. I've gone through the instructions directed here: https://facebook.github.io/react/docs/installation.html on the "Create a New App" tab exactly. Haven't done anything differently.
I'm using node 8.1.3, and npm 5.0.4
(I've also tried downgrading node to 6.11 without success).
I don't get any errors at all during installation.
When I run npm start, I get this super unhelpful error:
Starting the development server...
events.js:182
throw er; // Unhandled 'error' event
^
Error: watch /var/phil-machine/Code/react/test1/public ENOSPC
at exports._errnoException (util.js:1022:11)
at FSWatcher.start (fs.js:1384:19)
at Object.fs.watch (fs.js:1410:11)
at createFsWatchInstance (/var/phil-machine/Code/react/test1/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/var/phil-machine/Code/react/test1/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/var/phil-machine/Code/react/test1/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at FSWatcher.NodeFsHandler._handleDir (/var/phil-machine/Code/react/test1/node_modules/chokidar/lib/nodefs-handler.js:407:19)
at FSWatcher.<anonymous> (/var/phil-machine/Code/react/test1/node_modules/chokidar/lib/nodefs-handler.js:455:19)
at FSWatcher.<anonymous> (/var/phil-machine/Code/react/test1/node_modules/chokidar/lib/nodefs-handler.js:460:16)
at FSReqWrap.oncomplete (fs.js:153:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test1#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test1#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/phil/.npm/_logs/2017-07-05T23_52_25_652Z-debug.log
I'm at a loss. I've googled it (as best as I can - I'm not even sure what to google apart from the generic "react start error"), and got this answer https://stackoverflow.com/a/39960890/1569591 but that didn't help either.
When I run npm start it brings up the above error, and opens the bowser with a "Site cant be reached" error.
Can anyone help point me in the direction of how to fix this?
I've also tried changing the start command to use a different port:
PORT=3001 react-scripts start
Didn't work either.
Looks like an issue with node, ENOSPC means that there is no space on the drive.
Perhaps /tmp is full? You can configure npm to use a different temp folder by setting npm config set tmp /path/to/some/other/dir, or maybe delete everything out of the /tmp folder.
Source: ENOSPC in npm's repo in github.
I'm not entirely sure if this was the issue, but I've got it working.
It turns out another service, Grafana was using localhost port 3000. I removed Grafana and it still failed. After rebooting it appeared to work.
Again, I'm not sure if this will solve it 100% if others have the same problem, but this is what solved it for me.
I don't know which Operating System you are using but if you are using Fedora or CentOS try disabling selinux.
I had similar issue, but after disabling selinux it started working perfectly.