Skip to content

Error when running npm run dev or npm run build #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
n3ir opened this issue May 4, 2021 · 7 comments
Closed

Error when running npm run dev or npm run build #3

n3ir opened this issue May 4, 2021 · 7 comments
Assignees

Comments

@n3ir
Copy link

n3ir commented May 4, 2021

I get this error when trying to run npm run dev or npm run build in the starter project:

ERROR in ./src/app.ts 1:0-56
Module not found: Error: Can't resolve '@nodegui/svelte-nodegui' in 'C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\src'
resolve '@nodegui/svelte-nodegui' in 'C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\src'
  Parsed request is a module
  using description file: C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\package.json (relative path: ./src)     
    resolve as module
      C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\src\node_modules doesn't exist or is not a directory        
      looking for modules in C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules
        single file module
          using description file: C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\package.json (relative path: ./node_modules/@nodegui/svelte-nodegui)
            no extension
              C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui is not a file  
            .ts
              C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui.ts doesn't exist
            .mjs
              C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui.mjs doesn't exist
            .js
              C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui.js doesn't exist
            .svelte
              C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui.svelte doesn't 
exist
            .scss
              C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui.scss doesn't exist
            .css
              C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui.css doesn't exist
            .json
              C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui.json doesn't exist
        existing directory C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui   
          using description file: C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui\package.json (relative path: .)
            using description file: C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\package.json (relative path: ./node_modules/@nodegui/svelte-nodegui)
              no extension
                C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui is not a file              .ts
                C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui.ts doesn't exist
              .mjs
                C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui.mjs doesn't exist
              .js
                C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui.js doesn't exist
              .svelte
                C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui.svelte doesn't exist
              .scss
                C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui.scss doesn't 
exist
              .css
                C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui.css doesn't exist
              .json
                C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui.json doesn't 
exist
              as directory
                existing directory C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui
                  using description file: C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui\package.json (relative path: .)
                    using path: C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui\index
                      using description file: C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui\package.json (relative path: ./index)
                        no extension
                          C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui\index doesn't exist
                        .ts
                          C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui\index.ts doesn't exist
                        .mjs
                          C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui\index.mjs doesn't exist
                        .js
                          C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui\index.js doesn't exist
                        .svelte
                          C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui\index.svelte doesn't exist
                        .scss
                          C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui\index.scss doesn't exist
                        .css
                          C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui\index.css doesn't exist
                        .json
                          C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\svelte_nodegui_starter\node_modules\@nodegui\svelte-nodegui\index.json doesn't exist
      C:\Users\rieno\Documents\Svelte-Apps\test-nodegui\node_modules doesn't exist or is not a directory
      C:\Users\rieno\Documents\Svelte-Apps\node_modules doesn't exist or is not a directory
      C:\Users\rieno\Documents\node_modules doesn't exist or is not a directory
      looking for modules in C:\Users\rieno\node_modules
        single file module
          No description file found in C:\Users\rieno\node_modules\@nodegui or above
          no extension
            C:\Users\rieno\node_modules\@nodegui\svelte-nodegui doesn't exist
          .ts
            C:\Users\rieno\node_modules\@nodegui\svelte-nodegui.ts doesn't exist
          .mjs
            C:\Users\rieno\node_modules\@nodegui\svelte-nodegui.mjs doesn't exist
          .js
            C:\Users\rieno\node_modules\@nodegui\svelte-nodegui.js doesn't exist
          .svelte
            C:\Users\rieno\node_modules\@nodegui\svelte-nodegui.svelte doesn't exist
          .scss
            C:\Users\rieno\node_modules\@nodegui\svelte-nodegui.scss doesn't exist
          .css
            C:\Users\rieno\node_modules\@nodegui\svelte-nodegui.css doesn't exist
          .json
            C:\Users\rieno\node_modules\@nodegui\svelte-nodegui.json doesn't exist
        C:\Users\rieno\node_modules\@nodegui\svelte-nodegui doesn't exist
      C:\Users\node_modules doesn't exist or is not a directory
      C:\node_modules doesn't exist or is not a directory

webpack 5.24.2 compiled with 1 error in 2260 ms
ERROR in src/app.ts:1:31
TS2307: Cannot find module '@nodegui/svelte-nodegui' or its corresponding type declarations.
  > 1 | import { svelteNodeGUI } from "@nodegui/svelte-nodegui";
      |                               ^^^^^^^^^^^^^^^^^^^^^^^^^
    2 |
    3 | import App from "./App.svelte";
    4 | svelteNodeGUI(App, {});

Does anyone know how to fix this?

@shirakaba
Copy link
Collaborator

I'm debugging this now with several users. Seems to be an issue affecting those using Node higher than v14.6.0. Could you try this, please?

nodegui/svelte-nodegui#65 (comment)

@n3ir
Copy link
Author

n3ir commented May 4, 2021

I tried it. It did not work, maybe because the stater project is using webpack?

@n3ir
Copy link
Author

n3ir commented May 4, 2021

Oh wait i modified the wrong package.json. i will try again

@n3ir
Copy link
Author

n3ir commented May 4, 2021

It did not work. I got the same error.

@n3ir
Copy link
Author

n3ir commented May 4, 2021

I could try downgrading node with nvm. Should i do that?

@shirakaba shirakaba self-assigned this May 4, 2021
@shirakaba
Copy link
Collaborator

@n3ir As mentioned in the linked issue, downgrading Node won't work – your best option until I have a moment to republish the package is to try downgrading through each different version of @nodegui/svelte-nodegui until you find one that works.

The last versions are:

0.1.1 (this is the latest one, and is known to be broken)
0.1.0
0.0.4
0.0.3-alpha.1
0.0.2-alpha.2
0.0.2-alpha.1

@shirakaba
Copy link
Collaborator

Should be fixed in version 0.1.2:

npm notice 
npm notice 📦  @nodegui/[email protected]
npm notice === Tarball Contents === 
npm notice 1.1kB  LICENSE                                                                  
npm notice 7.2kB  components/index.js                                                      
npm notice 99.9kB dom/index.js                                                             
npm notice 72.1kB dom/react-nodegui/src/index.js                                           
npm notice 1.2kB  index.js                                                                 
npm notice 7.3kB  transitions/index.js                                                     
npm notice 44B    svelte-nodegui.js                                                        
npm notice 616B   package.json                                                             
npm notice 1.8kB  components/index.js.map                                                  
npm notice 13.8kB dom/index.js.map                                                         
npm notice 13.2kB dom/react-nodegui/src/index.js.map                                       
npm notice 114B   index.js.map                                                             
npm notice 221B   transitions/index.js.map                                                 
npm notice 98B    svelte-nodegui.js.map                                                    
npm notice 5.7kB  CHANGELOG.md                                                             
npm notice 8.8kB  Readme.md                                                                
npm notice 745B   transitions/bezier.d.ts                                                  
npm notice 2.2kB  dom/react-nodegui/src/components/config.d.ts                             
npm notice 94B    dom/react-nodegui/src/utils/decoupleFromReact.d.ts                       
npm notice 451B   dom/svelte/HeadElement.d.ts                                              
npm notice 126B   dom/react-nodegui/src/utils/helpers.d.ts                                 
npm notice 58B    components/index.d.ts                                                    
npm notice 944B   dom/index.d.ts                                                           
npm notice 386B   dom/nativescript-vue-next/index.d.ts                                     
npm notice 392B   dom/nativescript-vue-next/runtime/index.d.ts                             
npm notice 38B    dom/react-nodegui/src/components/Action/index.d.ts                       
npm notice 45B    dom/react-nodegui/src/components/AnimatedImage/index.d.ts                
npm notice 39B    dom/react-nodegui/src/components/BoxView/index.d.ts                      
npm notice 38B    dom/react-nodegui/src/components/Button/index.d.ts                       
npm notice 40B    dom/react-nodegui/src/components/CheckBox/index.d.ts                     
npm notice 40B    dom/react-nodegui/src/components/ComboBox/index.d.ts                     
npm notice 36B    dom/react-nodegui/src/components/Dial/index.d.ts                         
npm notice 42B    dom/react-nodegui/src/components/GridView/GridColumn/index.d.ts          
npm notice 39B    dom/react-nodegui/src/components/GridView/GridRow/index.d.ts             
npm notice 40B    dom/react-nodegui/src/components/GridView/index.d.ts                     
npm notice 37B    dom/react-nodegui/src/components/Image/index.d.ts                        
npm notice 40B    dom/react-nodegui/src/components/LineEdit/index.d.ts                     
npm notice 36B    dom/react-nodegui/src/components/Menu/index.d.ts                         
npm notice 39B    dom/react-nodegui/src/components/MenuBar/index.d.ts                      
npm notice 45B    dom/react-nodegui/src/components/PlainTextEdit/index.d.ts                
npm notice 43B    dom/react-nodegui/src/components/ProgressBar/index.d.ts                  
npm notice 43B    dom/react-nodegui/src/components/RadioButton/index.d.ts                  
npm notice 42B    dom/react-nodegui/src/components/ScrollArea/index.d.ts                   
npm notice 38B    dom/react-nodegui/src/components/Slider/index.d.ts                       
npm notice 39B    dom/react-nodegui/src/components/SpinBox/index.d.ts                      
npm notice 35B    dom/react-nodegui/src/components/Svg/index.d.ts                          
npm notice 46B    dom/react-nodegui/src/components/SystemTrayIcon/index.d.ts               
npm notice 36B    dom/react-nodegui/src/components/Tab/index.d.ts                          
npm notice 39B    dom/react-nodegui/src/components/TabItem/index.d.ts                      
npm notice 36B    dom/react-nodegui/src/components/Text/index.d.ts                         
npm notice 36B    dom/react-nodegui/src/components/View/index.d.ts                         
npm notice 38B    dom/react-nodegui/src/components/Window/index.d.ts                       
npm notice 3.2kB  dom/react-nodegui/src/index.d.ts                                         
npm notice 41B    dom/react-nodegui/src/reconciler/index.d.ts                              
npm notice 46B    dom/shared/index.d.ts                                                    
npm notice 1.2kB  index.d.ts                                                               
npm notice 976B   transitions/index.d.ts                                                   
npm notice 234B   dom/shared/Logger.d.ts                                                   
npm notice 5.1kB  dom/nativescript-vue-next/runtime/nodes.d.ts                             
npm notice 1.8kB  dom/nativescript-vue-next/runtime/registry.d.ts                          
npm notice 1.7kB  dom/react-nodegui/src/components/AbstractComponents/RNAbstractButton.d.ts
npm notice 2.8kB  dom/react-nodegui/src/components/Action/RNAction.d.ts                    
npm notice 756B   dom/react-nodegui/src/components/AnimatedImage/RNAnimatedImage.d.ts      
npm notice 891B   dom/react-nodegui/src/components/BoxView/RNBoxView.d.ts                  
npm notice 1.5kB  dom/react-nodegui/src/components/Button/RNButton.d.ts                    
npm notice 1.5kB  dom/react-nodegui/src/components/CheckBox/RNCheckBox.d.ts                
npm notice 1.3kB  dom/react-nodegui/src/components/ComboBox/RNComboBox.d.ts                
npm notice 1.2kB  dom/react-nodegui/src/components/Dial/RNDial.d.ts                        
npm notice 1.0kB  dom/react-nodegui/src/components/GridView/GridColumn/RNGridColumn.d.ts   
npm notice 1.3kB  dom/react-nodegui/src/components/GridView/GridRow/RNGridRow.d.ts         
npm notice 1.6kB  dom/react-nodegui/src/components/GridView/RNGridView.d.ts                
npm notice 1.8kB  dom/react-nodegui/src/components/Image/RNImage.d.ts                      
npm notice 1.4kB  dom/react-nodegui/src/components/LineEdit/RNLineEdit.d.ts                
npm notice 598B   dom/react-nodegui/src/components/Menu/RNMenu.d.ts                        
npm notice 649B   dom/react-nodegui/src/components/MenuBar/RNMenuBar.d.ts                  
npm notice 1.3kB  dom/svelte/RNObject.d.ts                                                 
npm notice 1.5kB  dom/react-nodegui/src/components/PlainTextEdit/RNPlainTextEdit.d.ts      
npm notice 1.3kB  dom/react-nodegui/src/components/ProgressBar/RNProgressBar.d.ts          
npm notice 730B   dom/react-nodegui/src/components/RadioButton/RNRadioButton.d.ts          
npm notice 710B   dom/react-nodegui/src/components/ScrollArea/RNScrollArea.d.ts            
npm notice 1.0kB  dom/react-nodegui/src/components/Slider/RNSlider.d.ts                    
npm notice 1.5kB  dom/react-nodegui/src/components/SpinBox/RNSpinBox.d.ts                  
npm notice 888B   dom/react-nodegui/src/components/Svg/RNSvg.d.ts                          
npm notice 2.8kB  dom/react-nodegui/src/components/SystemTrayIcon/RNSystemTrayIcon.d.ts    
npm notice 830B   dom/react-nodegui/src/components/Tab/RNTab.d.ts                          
npm notice 923B   dom/react-nodegui/src/components/TabItem/RNTabItem.d.ts                  
npm notice 978B   dom/react-nodegui/src/components/Text/RNText.d.ts                        
npm notice 6.2kB  dom/react-nodegui/src/components/View/RNView.d.ts                        
npm notice 708B   dom/react-nodegui/src/components/Window/RNWindow.d.ts                    
npm notice 232B   dom/nativescript-vue-next/runtime/runtimeHelpers.d.ts                    
npm notice 585B   dom/svelte/StyleElement.d.ts                                             
npm notice 57B    dom/svelte-elements.d.ts                                                 
npm notice 5.5kB  svelte-nodegui.d.ts                                                      
npm notice 994B   dom/svelte/SvelteNodeGUIDocument.d.ts                                    
npm notice 126B   components/Template.svelte.d.ts                                          
npm notice 299B   dom/svelte/TemplateElement.d.ts                                          
npm notice 1.0kB  dom/react-nodegui/src/components/GridView/utils.d.ts                     
npm notice === Tarball Details === 
npm notice name:          @nodegui/svelte-nodegui                 
npm notice version:       0.1.2                                   
npm notice package size:  56.8 kB                                 
npm notice unpacked size: 302.4 kB                                
npm notice shasum:        690eb8c9ed6ce9002601a42d1ddb38d21beed9df
npm notice integrity:     sha512-QesnaDBAOannx[...]/MtyGYQBQ5Ufw==
npm notice total files:   97                                      
npm notice 
+ @nodegui/[email protected]

Try the following:

npm install --save "@nodegui/[email protected]"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants