Have an error while building Open World Server project in Linux. Error appears in Linux Lite and Debian.
=> CACHED [build 8/9] WORKDIR /src/OWSManagement 0.0s
=> CACHED [build 9/9] RUN dotnet build "OWSManagement.csproj" -c Release -o /app/ 0.0s
=> CACHED [build-node 3/5] COPY --from=build /src/OWSManagement/wwwroot . 0.0s
=> CACHED [build-node 4/5] RUN npm install 0.0s
=> ERROR [build-node 5/5] RUN npm run build 8.6s
=> CACHED [publish 1/1] RUN dotnet publish "OWSManagement.csproj" -c Release -o / 0.0s
=> CACHED [base 2/2] WORKDIR /app 0.0s
=> CACHED [final 1/3] WORKDIR /app 0.0s
=> CACHED [final 2/3] COPY --from=publish /app/publish . 0.0s
------
> [build-node 5/5] RUN npm run build:
#0 1.536
#0 1.536 > managementapp#0.0.0 build /wwwroot
#0 1.536 > vue-tsc && vite build
#0 1.536
#0 7.778 /wwwroot/node_modules/vite/bin/vite.js:2
#0 7.778 import { performance } from 'node:perf_hooks'
#0 7.778 ^
#0 7.778
#0 7.778 SyntaxError: Unexpected token {
#0 7.778 at Module._compile (internal/modules/cjs/loader.js:703:23)
#0 7.778 at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
#0 7.778 at Module.load (internal/modules/cjs/loader.js:628:32)
#0 7.778 at Function.Module._load (internal/modules/cjs/loader.js:555:12)
#0 7.778 at Function.Module.runMain (internal/modules/cjs/loader.js:826:10)
#0 7.778 at internal/main/run_main_module.js:17:11
#0 7.787 npm ERR! code ELIFECYCLE
#0 7.793 npm ERR! errno 1
#0 7.797 npm ERR! managementapp#0.0.0 build: `vue-tsc && vite build`
#0 7.797 npm ERR! Exit status 1
#0 7.797 npm ERR!
#0 7.797 npm ERR! Failed at the managementapp#0.0.0 build script.
#0 7.797 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
#0 7.811
#0 7.811 npm ERR! A complete log of this run can be found in:
#0 7.813 npm ERR! /root/.npm/_logs/2023-02-13T09_14_05_247Z-debug.log
------
failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
I switch Linux distro to Debian, also look into vite.js for probably CRLF-LF problems, but it's clear
#!/usr/bin/env node
import { performance } from 'node:perf_hooks'
if (!import.meta.url.includes('node_modules')) {
try {
// only available as dev dependency
await import('source-map-support').then((r) => r.default.install())
} catch (e) {}
}
global.__vite_start_time = performance.now()
vite.js first lines. Link to file:
Related
I want to integrate google map in my laravel project and I got the below error when running npm run dev:
98% after emitting SizeLimitsPlugin
ERROR Failed to compile with 1 errors 10:52:34 PM
This dependency was not found:
/var/www/project_name/resources/sass/app.scss in multi ./resources/js/app.js ./resources/sass/app.scss
To install it, you can run: npm install --save /var/www/project_name/resources/sass/app.scss
Asset Size Chunks Chunk Names
/js/app.js 7.23 KiB /js/app [emitted] /js/app
ERROR in ./resources/js/app.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Cannot find module '#babel/preset-react' from '/var/www/project_name'
at Function.resolveSync [as sync] (/var/www/project_name/node_modules/resolve/lib/sync.js:90:15)
at resolveStandardizedName (/var/www/project_name/node_modules/#babel/core/lib/config/files/plugins.js:101:31)
at resolvePreset (/var/www/project_name/node_modules/#babel/core/lib/config/files/plugins.js:58:10)
at loadPreset (/var/www/project_name/node_modules/#babel/core/lib/config/files/plugins.js:77:20)
at createDescriptor (/var/www/project_name/node_modules/#babel/core/lib/config/config-descriptors.js:154:9)
at /var/www/project_name/node_modules/#babel/core/lib/config/config-descriptors.js:109:50
at Array.map ()
at createDescriptors (/var/www/project_name/node_modules/#babel/core/lib/config/config-descriptors.js:109:29)
at createPresetDescriptors (/var/www/project_name/node_modules/#babel/core/lib/config/config-descriptors.js:101:10)
at presets (/var/www/project_name/node_modules/#babel/core/lib/config/config-descriptors.js:47:19)
at mergeChainOpts (/var/www/project_name/node_modules/#babel/core/lib/config/config-chain.js:416:26)
at /var/www/project_name/node_modules/#babel/core/lib/config/config-chain.js:374:7
at Generator.next ()
at loadFileChain (/var/www/project_name/node_modules/#babel/core/lib/config/config-chain.js:228:24)
at loadFileChain.next ()
at buildRootChain (/var/www/project_name/node_modules/#babel/core/lib/config/config-chain.js:135:29)
at buildRootChain.next ()
at loadPrivatePartialConfig (/var/www/project_name/node_modules/#babel/core/lib/config/partial.js:101:62)
at loadPrivatePartialConfig.next ()
at /var/www/project_name/node_modules/#babel/core/lib/config/partial.js:140:25
at Generator.next ()
at step (/var/www/project_name/node_modules/gensync/index.js:261:32)
at /var/www/project_name/node_modules/gensync/index.js:273:13
at async.call.result.err.err (/var/www/project_name/node_modules/gensync/index.js:223:11)
at /var/www/project_name/node_modules/gensync/index.js:189:28
at /var/www/project_name/node_modules/#babel/core/lib/gensync-utils/async.js:72:7
at /var/www/project_name/node_modules/gensync/index.js:113:33
at step (/var/www/project_name/node_modules/gensync/index.js:287:14)
at /var/www/project_name/node_modules/gensync/index.js:273:13
at async.call.result.err.err (/var/www/project_name/node_modules/gensync/index.js:223:11)
at /var/www/project_name/node_modules/gensync/index.js:189:28
at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)
# multi ./resources/js/app.js ./resources/sass/app.scss /js/app[0]
ERROR in multi ./resources/js/app.js ./resources/sass/app.scss
Module not found: Error: Can't resolve 'css-loader' in '/var/www/project_name'
# multi ./resources/js/app.js ./resources/sass/app.scss /js/app[1]
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! project_name# development: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the project_name# development 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! /root/.npm/_logs/2020-12-11T22_52_34_252Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! project_name# dev: npm run development
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the project_name# 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! /root/.npm/_logs/2020-12-11T22_52_34_309Z-debug.log
I tried different things and none worked:
npm update
npm uninstall --save-dev sass-loader
npm install --save-dev sass-loader#7.1.0
npm install --save
npm install
but the error persist when I run npm run dev.
I experienced the same issue when I tried to use
import {someFunction} from '';
, i.e. I forgot to specify the package to import from.
When I fixed the import I compiled with no issue.
I made this:
vue create myfirstapp
atom (for open my editor)
cd myfirst app
npm run serve
and I get this
> myfirstapp#0.1.0 serve /home/paolinsky/Documentos/vueBasico/fazt/myfirstapp
> vue-cli-service serve
INFO Starting development server...
10% building 2/2 modules 0 activeevents.js:196
throw er; // Unhandled 'error' event
^
Error: ENOSPC: System limit for number of file watchers reached, watch '/home/paolinsky/Documentos/vueBasico/fazt/myfirstapp/public'
at FSWatcher.<computed> (internal/fs/watchers.js:168:26)
at Object.watch (fs.js:1351:34)
at createFsWatchInstance (/home/paolinsky/Documentos/vueBasico/fazt/myfirstapp/node_modules/chokidar/lib/nodefs-handler.js:38:15)
at setFsWatchListener (/home/paolinsky/Documentos/vueBasico/fazt/myfirstapp/node_modules/chokidar/lib/nodefs-handler.js:81:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/paolinsky/Documentos/vueBasico/fazt/myfirstapp/node_modules/chokidar/lib/nodefs-handler.js:233:14)
at FSWatcher.NodeFsHandler._handleDir (/home/paolinsky/Documentos/vueBasico/fazt/myfirstapp/node_modules/chokidar/lib/nodefs-handler.js:429:19)
at FSWatcher.<anonymous> (/home/paolinsky/Documentos/vueBasico/fazt/myfirstapp/node_modules/chokidar/lib/nodefs-handler.js:477:19)
at FSWatcher.<anonymous> (/home/paolinsky/Documentos/vueBasico/fazt/myfirstapp/node_modules/chokidar/lib/nodefs-handler.js:482:16)
at FSReqCallback.oncomplete (fs.js:165:5)
Emitted 'error' event on FSWatcher instance at:
at FSWatcher._handleError (/home/paolinsky/Documentos/vueBasico/fazt/myfirstapp/node_modules/chokidar/index.js:260:10)
at createFsWatchInstance (/home/paolinsky/Documentos/vueBasico/fazt/myfirstapp/node_modules/chokidar/lib/nodefs-handler.js:40:5)
at setFsWatchListener (/home/paolinsky/Documentos/vueBasico/fazt/myfirstapp/node_modules/chokidar/lib/nodefs-handler.js:81:15)
[... lines matching original stack trace ...]
at FSReqCallback.oncomplete (fs.js:165:5) {
errno: -28,
syscall: 'watch',
code: 'ENOSPC',
path: '/home/paolinsky/Documentos/vueBasico/fazt/myfirstapp/public',
filename: '/home/paolinsky/Documentos/vueBasico/fazt/myfirstapp/public'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! myfirstapp#0.1.0 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the myfirstapp#0.1.0 serve 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/paolinsky/.npm/_logs/2019-12-15T15_13_50_223Z-debug.log
This always happen in all my vue projects, included the new ones.
My versions are:
npm: 6.13.4
node: v13.3.0
I'm running Ubuntu 18.04 on an asus vivobook laptop
4gb ram, Intel core I3 7th gen
I ran into this same problem recently. I solved it like this:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
cat /proc/sys/fs/inotify/max_user_watches
fs.inotify.max_user_watches=524288
I am trying to make my first confluence macro and I am following the instructions laid out here:https://developer.atlassian.com/cloud/confluence/getting-started/?_ga=2.78735767.2027190294.1547046060-2004234667.1546438516
Currently, I am having trouble with steps 2 and 4; NPM install and NPM start:
Received the following errors:
➜ ~ cd confluence_app
➜ confluence_app
➜ confluence_app ls
confluence-helloworld-addon credentials.json package-lock.json
➜ confluence_app ls
confluence-helloworld-addon
➜ confluence_app cd confluence-helloworld-addon
➜ confluence-helloworld-addon git:(master) npm install package.json
npm notice created a lockfile as package-lock.json. You should commit this file.
+ package.json#2.0.1
added 74 packages from 35 contributors and audited 162 packages in 29.12s
found 0 vulnerabilities
➜ confluence-helloworld-addon git:(master) ✗ npm start
> helloworld-addon#0.0.1 start /Users/serdarmustafa/confluence_app/confluence-helloworld-addon
> node app.js
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module 'express'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/Users/serdarmustafa/confluence_app/confluence-helloworld-addon/app.js:6:15)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! helloworld-addon#0.0.1 start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the helloworld-addon#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:
npm ERR! /Users/serdarmustafa/.npm/_logs/2019-01-12T09_26_18_269Z-debug.log
run npm cache clean --force first, and then run npm install, then npm start
this should fix it..
--
OR delete the node_modules folder and re-run npm install
--
OR
1. npm cache clean --force
delete node_modules and package-lock.json,
npm install
I developed an API in javascript and nodejs and now I try to run it on an Ubuntu16 Server.
The API run well on my local computer but not on the server. When I start it on the server, I have this error:
body-parser deprecated undefined extended: provide extended option
app.js:12:20 module.js:328
throw err;
^
Error: Cannot find module 'firebird'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (/root/Serveur/apishopline/app.js:17:10)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
I have install Firebird 2.5 , nodejs v4.2.6, python v2.7.12 and npm v3.5.2 on the server.
So I have try to install the firebird module with the command line :
sudo npm install firebird
But i have this error too:
> /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libfbclient.so when
> searching for -lfbclient
> /usr/bin/ld: skipping incompatible /usr/lib/../lib/libfbclient.so when searching for -lfbclient
> /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/5/../../../libfbclient.so when searching
> for -lfbclient
> /usr/bin/ld: skipping incompatible //usr/lib/libfbclient.so when searching for -lfbclient
> /usr/bin/ld: cannot find -lfbclient
> collect2: error: ld returned 1 exit status
> binding.target.mk:133: recipe for target 'Release/obj.target/binding.node' failed
> make: *** [Release/obj.target/binding.node] Error 1
> make: Leaving directory '/root/node_modules/firebird/build'
> gyp ERR! build error gyp ERR! stack Error: `make` failed with exit
> code: 2 gyp ERR! stack at ChildProcess.onExit
> (/usr/local/lib/node_modules/node-gyp/lib/build.js:258:23) gyp ERR!
> stack at emitTwo (events.js:87:13) gyp ERR! stack at
> ChildProcess.emit (events.js:172:7) gyp ERR! stack at
> Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
> gyp ERR! System Linux 4.4.0-93-generic gyp ERR! command
> "/usr/bin/nodejs" "/usr/local/bin/node-gyp" "rebuild" gyp ERR! cwd
> /usr/local/lib/node_modules/firebird gyp ERR! node -v v4.2.6 gyp ERR!
> node-gyp -v v3.6.2 gyp ERR! not ok npm ERR! Linux 4.4.0-93-generic
> npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "firebird"
> "-g" npm ERR! node v4.2.6 npm ERR! npm v3.5.2 npm ERR! code
> ELIFECYCLE
>
> npm ERR! firebird#0.1.1 install: `node-gyp rebuild` npm ERR! Exit
> status 1 npm ERR! npm ERR! Failed at the firebird#0.1.1 install
> script 'node-gyp rebuild'. npm ERR! Make sure you have the latest
> version of node.js and npm installed. npm ERR! If you do, this is most
> likely a problem with the firebird package, npm ERR! not with npm
> itself. npm ERR! Tell the author that this fails on your system: npm
> ERR! node-gyp rebuild npm ERR! You can get information on how to
> open an issue for this project with: npm ERR! npm bugs firebird
> npm ERR! Or if that isn't available, you can get their info via: npm
> ERR! npm owner ls firebird npm ERR! There is likely additional
> logging output above.
>
> npm ERR! Please include the following file with any support request:
> npm ERR! /root/Serveur/apishopline/npm-debug.log
You are missing the -lfbclient library. The current name and version is libfbclient2, therefore create a symklink to libfbclient.
look for libfbclient2
find /usr/ libfb | grep libfb
go to the directory where libfbclient2 is
cd /path/to/lib/
create a symlink in order to allow the script to find lfbclient
ln -s libfbclient2.so libfbclient.so
reinstall the npm modeule
npm install firebird
when I run npm start command I am getting the below error
I followed the below steps in the link
https://github.com/kriasoft/react-starter-kit/blob/master/docs/getting-started.md
can you tell me how to fix it
providing error below
xxx-nameKumar--MacBook-Pro:MyApp xxx-name$ npm start
> # start /Users/xxx-name/Desktop/FrontEnd/MyApp
> babel-node tools/run start
/Users/xxx-name/Desktop/FrontEnd/MyApp/tools/run.js:20
const task = typeof fn.default === 'undefined' ? fn : fn.default;
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at loader (/Users/xxx-name/Desktop/FrontEnd/MyApp/node_modules/babel-cli/node_modules/babel-register/lib/node.js:126:5)
at Object.require.extensions.(anonymous function) [as .js] (/Users/xxx-name/Desktop/FrontEnd/MyApp/node_modules/babel-cli/node_modules/babel-register/lib/node.js:136:7)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at /Users/xxx-name/Desktop/FrontEnd/MyApp/node_modules/babel-cli/lib/_babel-node.js:161:27
at Object.<anonymous> (/Users/xxx-name/Desktop/FrontEnd/MyApp/node_modules/babel-cli/lib/_babel-node.js:162:7)
at Module._compile (module.js:460:26)
npm ERR! Darwin 14.5.0
npm ERR! argv "node" "/usr/local/bin/npm" "start"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! # start: `babel-node tools/run start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # start script 'babel-node tools/run start'.
npm ERR! This is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! babel-node tools/run start
npm ERR! You can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/xxx-name/Desktop/FrontEnd/MyApp/npm-debug.log
You have syntax error:
SyntaxError: Use of const in strict mode.
Do you have 'use strict' in your code?
What version of node do you have?
The const and let are part of ES6 and are not enabled by default in Node.js 0.10 or 0.12.
Update nodejs. Const is a new feature. The version you have (0.12.0) is outdated. The link says you need 5.0 or newer. Download and install 5.9.1 (not 4.4.1) form https://nodejs.org/en/. Then try again.
You can try to update your npm by typing
sudo Npm install -g npm