build error came after update node modules - javascript

Error on fetch for node_modules/angular2-notifications/src/simple-notifications.module.js at file:///D:/GIP/IMAGE PILOT/gipfe/node_modules/angular2-notifications/src/simple-notifications.module.js
Loading build/tmp/aot/src/app/app.module.ngfactory.js
Loading build\boot-aot.js
Error: ENOENT: no such file or directory, open 'D:\GIP\IMAGE PILOT\gipfe\node_modules\angular2-notifications\src\simple-notifications.module.js'
[10:13:51] 'build.aot' errored after 52 s
[10:13:51] Error in plugin 'run-sequence(bundle-aot)'
Message:
Error on fetch for node_modules/angular2-notifications/src/simple-notifications.module.js at file:///D:/GIP/IMAGE PILOT/gipfe/node_modules/angular2-notifications/src/simple-notifications.module.js
Loading build/tmp/aot/src/app/app.module.ngfactory.js
Loading build\boot-aot.js
ENOENT: no such file or directory, open 'D:\GIP\IMAGE PILOT\gipfe\node_modules\angular2-notifications\src\simple-notifications.module.js'
Details:
originalErr: Error: ENOENT: no such file or directory, open 'D:\GIP\IMAGE PILOT\gipfe\node_modules\angular2-notifications\src\simple-notifications.module.js'
Stack:
Error on fetch for node_modules/angular2-notifications/src/simple-notifications.module.js at file:///D:/GIP/IMAGE PILOT/gipfe/node_modules/angular2-notifications/src/simple-notifications.module.js
Loading build/tmp/aot/src/app/app.module.ngfactory.js
Loading build\boot-aot.js
Error: ENOENT: no such file or directory, open 'D:\GIP\IMAGE PILOT\gipfe\node_modules\angular2-notifications\src\simple-notifications.module.js'
import { SimpleNotificationsModule } from 'angular2-notifications';
imports: [
SharedModule,
routing,
ToastModule.forRoot(),
SimpleNotificationsModule.forRoot(),
this build error came when i take build npm run build.aot command. i put npm install command in my project then i try to take build error was came.
pls help me to resolve this
thank you.

Before i installed typescript version
"typescript": "^2.3.3" // package.json
then i changed the typescript version
"typescript": "2.3.3" //without cap symbol
Now,error was not came and i took build successfully

Related

Electron fails to install on CI

After we migrated to Electron v11 for our project from v6, we started experiencing weird CI issues, where Electron did not install properly and the pipeline failed.
Our setup:
Lerna
Monorepo
Yarn v1.22
Private npm registry
Example of such issues:
[4/4] Building fresh packages...
error /builds/xxxx/..../node_modules/electron, /builds/.../node_modules/electron, /builds/xxxx/app/node_modules/electron: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: /builds/xxxx/features/yyyy/node_modules/electron
Output:
Error: dest already exists.
at /builds/xxxx/node_modules/fs-extra/lib/move/move.js:41:31
Exit code: 1
Command: node install.js
Arguments:
Directory: C:\gitlab\builds\pFMTxHs3\0\xxxxxx\features\yyyyy\node_modules\electron
Output:
C:\gitlab\builds\pFMTxHs3\0\xxxx\features\yyyyy\node_modules\electron\install.js:51
throw err
^
[Error: ENOENT: no such file or directory, open 'C:\Users\xxxx\AppData\Local\electron\Cache\httpsgithub.comelectronelectronreleasesdownloadv7.1.4electron-v7.1.4-win32-x64.zip\electron-v7.1.4-win32-x64.zip'] {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\Users\\xxxx\\AppData\\Local\\electron\\Cache\\httpsgithub.comelectronelectronreleasesdownloadv7.1.4electron-v7.1.4-win32-x64.zip\\electron-v7.1.4-win32-x64.zip'
We tried deleting CI caches, Yarn caches, NPM caches all of that worked inconsistently. Sometimes we would have successful pipelines, sometimes not.
After a couple of months battling with this ghost, we had another error 5xx upon trying to download electron. It suddenly stopped downloading everywhere local machines and CI.
After getting in touch with the Electron team I discovered the problem.
We had a very old .npmrc config, which was no longer valid.
It contained this:
disturl=https://atom.io/download/electron
When I've changed the line into this:
disturl=https://electronjs.org/headers
All of our pain was gone - our builds became stable again.
Big thanks to the electron community!

ENOENT: no such file or directory, scandir '/Users/kobi.ktk/Desktop/uniexpo/node_modules/#expo/vector-icons/fonts' Failed building JavaScript bundle

When I try to upgrade expo SDK version 30 -> 33 I got this error,
I tried several methods, but couldn't

ReactJS - net::ERR_FILE_NOT_FOUND

I'm suddenly having issues with production versions of my react apps. They work fine in development, however when I build them, I get a console error:
/static/css/main.f6418f8a.chunk.css:1 Failed to load resource:
net::ERR_FILE_NOT_FOUND
1.13eeb203.chunk.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
main.1e6014ca.chunk.js:1 Failed to load resource:
net::ERR_FILE_NOT_FOUND
/favicon.ico:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
This error was received after the following commands:
create-react-app whatiswrong
npm run build
Then open the index.html in my browser like I would for any other react apps I've built.
You need to add "homepage": "./" to your package.json.
From:
https://github.com/facebook/create-react-app/issues/6275#issuecomment-457813277
Open your package.json file.
Add this entry to it "homepage":"path\to\your\project\build\"
Re-run the command npm run build.
The issue here was when you run the npm run build command without the homepage entry added in your package.json,it is built assuming that the project directory (where you are running the command) is hosted at server root.
screen-shot commandline
D:\git_repo\my-app>npm run build
> my-app#0.1.0 build D:\git_repo\my-app
> react-scripts build
Creating an optimized production build...
Compiled successfully.
File sizes after gzip:
44.57 KB build\static\js\main.8a29685f.js
**The project was built assuming it is hosted at root directory.
You can control this with the homepage field in your package.json.**
The build folder is ready to be deployed.
D:\git_repo\my-app>
How are you running your app? Are you just opening the index.html in the browser or are you using serve -s build and such?
If you are doing it by the first option then you should consider trying serve -s build

Ionic build android on Linux

When I run ionic build android, I get this error:
shell.js: internal error
Error: ENOENT: no such file or directory, open '/home/darko/Downloads/todo/false/shelljs_2da7bb00de48ebd25547'
at Error (native)
at Object.fs.openSync (fs.js:584:18)
at Object.fs.writeFileSync (fs.js:1224:33)
at execSync (/usr/local/lib/node_modules/ionic/node_modules/shelljs/src/exec.js:56:6)
at Object._exec (/usr/local/lib/node_modules/ionic/node_modules/shelljs/src/exec.js:179:12)
at Object.exec (/usr/local/lib/node_modules/ionic/node_modules/shelljs/src/common.js:168:23)
at Object.getLinuxEnvironmentInfo (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/info.js:187:24)
at Object.getOsEnvironment (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/info.js:204:20)
at Object.t (/usr/local/lib/node_modules/ionic/lib/utils/stats.js:147:15)
at Object.run (/usr/local/lib/node_modules/ionic/lib/cli.js:135:16)
Please take note that path from the error:
ENOENT: no such file or directory, open '/home/darko/Downloads/todo/false/shelljs_2da7bb00de48ebd25547'
contains directory false, which I don't have..I think that should be node_modules instead of false.
Also, I had several problems before this error which I solved somehow, but I think I will get more errors as I go forward. Am I doing something fundamentaly wrong?

npm ERR spawn ENOENT

I am new to Node and I have this double error which is confusing for noobs like me...
Here is exactly what I did :
I installed the last version of Node on a clear directory, created an application, and created the following json package file:
{
"name":"Radiorev",
"version":"0.0.1",
"private":"true",
"dependencies":{
"express":"3.3.5",
"socket.io":"0.9.16"
}
}
When I execute npm install, I get the following error:
spawnENOENT" error at the end of the installation
Why I am getting this error

Categories